diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4fe575f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @caffeine-addictt \ No newline at end of file diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md new file mode 100644 index 0000000..c1513c5 --- /dev/null +++ b/.github/CODESTYLE.md @@ -0,0 +1,82 @@ +# Code Style +The following is a general guide on how to style your work so that the project +remains consistent throughout all files. Please read this document in it's entirety +and refer to it throughout the development of your contribution. + +1. [General Guidelines](#general-guidelines) +2. [Commit Message Guidelines](#commit-message-guidelines) +3. [Markdown Guidelines](#markdown-guidelines) + + + +## General Guidelines +Listed is a example class used demonstrate general rules you should follow throughout the development of your contribution. + +- Docstrings are to follow {{DOCSTRING_FORMAT}} +- Private attributes are to be prefixed with an underscore + +``` +code example +``` + + + +## Commit Message Guidelines +When committing, commit messages are prefixed with one of the following depending on the type of change made. + + - `feat:` when a new feature is introduced with the changes. + - `fix:` when a bug fix has occurred. + - `chore:` for changes that do not relate to a fix or feature and do not modify *source* or *tests*. (like updating dependencies) + - `refactor:` for refactoring code that neither fixes a bug nor adds a feature. + - `docs:` when changes are made to documentation. + - `style:` when changes that do not affect the code, but modify formatting. + - `test:` when changes to tests are made. + - `perf:` for changes that improve performance. + - `ci:` for changes that affect CI. + - `build:` for changes that affect the build system or external dependencies. + - `revert:` when reverting changes. + +Commit messages are also to begin with an uppercase character. Below list some example commit messages. + +```sh +git commit -m "docs: Added README.md" +git commit -m "revert: Removed README.md" +git commit -m "docs: Moved README.md" +``` + + +## Markdown Guidelines +Currently, documentation for this project resides in markdown files. + - Headings are to be separated with 3 lines + - Use of HTML comments is appreciated + - Use of HTML is permitted + - [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated + - Exceedingly long lines are to be broken + - The indents are to be 4 spaces + +```markdown + +# Section +Lorem ipsum dolor sit amet, consectetur adipiscing elit, +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in +reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat +non proident, sunt in culpa qui officia deserunt mollit +anim id est laborum. found [Lorem Ipsum Generator] + + + +# Section 2 + + + + +[Lorem Ipsum Generator]: https://loremipsum.io/generator/ +``` diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1631c6b --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at [contact@ngjx.org](mailto:contact@ngjx.org). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..40124bd --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# **Contributing** + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a [code of conduct](CODE_OF_CONDUCT.md); please follow it in all your interactions with the project. + + + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface; this includes new environment variables, exposed ports, valid file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + + + +## Issue Report Process + +1. Go to the project's issues. +2. Select the template that better fits your issue. +3. Read the instructions carefully and write within the template guidelines. +4. Submit it and wait for support. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md new file mode 100644 index 0000000..ed7a4a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -0,0 +1,80 @@ +--- +name: "Bug Report" +about: "Report an issue to help the project improve." +title: "[Bug] " +labels: "Type: Bug" +assignees: caffeine-addictt + +--- + +# Bug report +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Expected Behavior + + + + +## Current Behavior + + + + +## Is this a regression? + + + + +## Possible Solution + + + + +## Steps to Reproduce (for bugs) + +1. +2. +3. +4. + + + +## Context + + + + +## Your Environment + +* Version used: +* Operating System and version (desktop or mobile): \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md new file mode 100644 index 0000000..00b982a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -0,0 +1,40 @@ +--- +name: "Failing Test" +about: "Report failing tests or CI jobs." +title: "[Test] " +labels: "Type: Test" +assignees: caffeine-addictt + +--- + +# Failing Test +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Which Jobs/Tests are Failing? +* + + + +## Reason for Failure + + + + +## Media Prove + + + + +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md new file mode 100644 index 0000000..0821353 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -0,0 +1,41 @@ +--- +name: "Documentation or README.md issue report" +about: "Report an issue in the project's documentation or README.md file." +title: "" +labels: "Documentation" +assignees: caffeine-addictt + +--- + +# Documentation Issue Report +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Describe the Bug + + + + +## Steps to Reproduce + + +1. +2. +3. +4. + + + +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md new file mode 100644 index 0000000..5724f06 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -0,0 +1,43 @@ +--- +name: "Feature Request" +about: "Suggest an idea or possible new feature for this project." +title: "" +labels: "Type: Feature" +assignees: caffeine-addictt + +--- + +# Feature Request +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Is Your Feature Request Related to an Issue? + + + + +## Describe the Solution You'd Like + + + + +## Describe Alternatives You've Considered + + + + +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md new file mode 100644 index 0000000..6a5e5df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -0,0 +1,43 @@ +--- +name: "Enhancement Request" +about: "Suggest an enhancement for this project. Improve an existing feature" +title: "" +labels: "Type: Enhancement" +assignees: caffeine-addictt + +--- + +# Enhancement Request +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Is Your Enhancement Request Related to an Issue? + + + + +## Describe the Solution You'd Like + + + + +## Describe Alternatives You've Considered + + + + +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/6-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md new file mode 100644 index 0000000..cd36b43 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/6-security-report.md @@ -0,0 +1,95 @@ +--- +name: "Security Report" +about: "Report an issue to help the project improve." +title: "" +labels: "Type: Security" +assignees: caffeine-addictt + +--- + + + +# Security Report +Your issue may already be reported! +Please check out our [active issues](https://github.com/{{REPOSITORY}}/issues) before creating one. + + + +## Describe the Security Issue + + + + +## Steps to Reproduce + + + + +## Expected Behavior + + + + +## Media Prove + + + + +## Additional Context + + + + +### Your Environment + +* Version used: +* Operating System and version (desktop or mobile): \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md new file mode 100644 index 0000000..0d83d10 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -0,0 +1,20 @@ +--- +name: "Question or Support Request" +about: "Questions and requests for support." +title: "" +labels: ["Type: Question", "help wanted"] +assignees: caffeine-addictt + +--- + +# Question or Support Request + + + + +## Describe your question or ask for support + + +* \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..dccfc3a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,78 @@ + + +## What type of PR is this? (check all applicable) + +- [ ] Refactor +- [ ] Feature +- [ ] Bug Fix +- [ ] Optimization +- [ ] Breaking Change +- [ ] Documentation Update + + + +## Description + + + + +## Related Tickets & Documents + + + +- Related Issue # +- Closes # + + + +## QA Instructions, Screenshots, Recordings + +_Please replace this line with instructions on how to test your changes, a note +on the devices and browsers this has been tested on, as well as any relevant +images for UI changes._ + + + +## Added/updated tests? +_We encourage you to keep the code coverage percentage at 80% and above._ + +- [ ] Yes +- [ ] No, and this is why: _please replace this line with details on why tests + have not been included_ +- [ ] I need help with writing tests + + + +## [optional] Are there any post deployment tasks we need to perform? + + + + +## Checklist + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. \ No newline at end of file diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..3ac832f --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,11 @@ +# **Reporting Security Issues** + +The project's team and community take security issues. + +We appreciate your efforts to disclose your findings responsibly and will make every effort to acknowledge your contributions. + +To report a security issue, go to the project's issues and create a new issue using the ⚠️ Security Report 'issue template'. + +Read the instructions of this issue template carefully, and if your report could leak data or might expose how to gain access to a restricted area or break the system, please email [contact@ngjx.org](mailto:contact@ngjx.org) and include the word "SECURITY" in the subject line. + +We'll endeavour to respond quickly and keep you updated throughout the process. \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8c6a297 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.) + directory: "/" + schedule: + interval: "weekly" + + # - package-ecosystem: "npm" # See documentation for possible values + # directory: "/" # Location of package manifests + # schedule: + # interval: "weekly" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..ffac594 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,15 @@ +# This file is for the labeler workflow +# Documentation https://github.com/marketplace/actions/labeler + +Documentation: + - changed-files: + - any-glob-to-any-file: [docs/**, .github/**, "./*.{md,mdx}"] + - all-globs-to-all-files: "!.github/workflows/*" + +"Type: Test": + - changed-files: + - any-glob-to-any-file: [tests/**, ./*test*] + +"Type: CI": + - changed-files: + - any-glob-to-any-file: [.github/workflows/**] diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..03f3266 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,40 @@ +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +template: | + # What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + +categories: + - title: "New" + label: "Type: Feature" + + - title: "Bug Fixes" + label: "Type: Bug" + + - title: "Improvements" + label: "Type: Enhancement" + + - title: "Other changes" + + - title: "Documentation" + label: "Documentation" + collapse-after: 5 + +version-resolver: + major: + labels: + - "Type: Breaking" + minor: + labels: + - "Type: Feature" + patch: + labels: + - "Type: Bug" + - "Documentation" + - "Type: Security" + +exclude-labels: + - "Skip-Changelog" diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..e28c846 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,109 @@ +# These labels are automatically synced. +# 1. Install https://github.com/apps/settings to your GitHub account. +# 2. Scroll down and only enable access to selected repositories. +# 3. Select the repositories you want to sync. +# +# !!!!!!! SECURITY WARNING !!!!!!! +# Please be aware that this can escalate anyone with PUSH priviliages to the repository. +# To counteract this, please block force pushing and enable "Require CODE OWNER Approval" for Pull Requests to the main branch. + +labels: + - name: "Type: CI" + color: 54b2ff + description: A problem or enhancement related to continuous integration. + + - name: "Type: Breaking" + color: a90000 + description: A problem or enhancement related to a breaking change. + + - name: "Type: Bug" + color: e80c0c + description: Something isn't working as expected. + + - name: "Type: Enhancement" + color: 54b2ff + description: Suggest an improvement for an existing feature. + + - name: "Type: Feature" + color: 54b2ff + description: Suggest a new feature. + + - name: "Type: Security" + color: fbff00 + description: A problem or enhancement related to a security issue. + + - name: "Type: Question" + color: 9309ab + description: Request for information. + + - name: "Type: Test" + color: ce54e3 + description: A problem or enhancement related to a test. + + - name: "Status: Awaiting Review" + color: 24d15d + description: Ready for review. + + - name: "Status: WIP" + color: 07b340 + description: Currently being worked on. + + - name: "Status: Waiting" + color: 38C968 + description: Waiting on something else to be ready. + + - name: "Status: Stale" + color: 66b38a + description: Has had no activity for some time. + + - name: "Duplicate" + color: EB862D + description: Duplicate of another issue. + + - name: "Invalid" + color: faef50 + description: This issue doesn't seem right. + + - name: "Priority: High +" + color: ff008c + description: Task is considered higher-priority. + + - name: "Priority: Low -" + color: 690a34 + description: Task is considered lower-priority. + + - name: "Documentation" + color: 2fbceb + description: An issue/change with the documentation. + + - name: "Won't fix" + color: C8D9E6 + description: Reported issue is working as intended. + + - name: "3rd party issue" + color: e88707 + description: This issue might be caused by a 3rd party script/package/other reasons + + - name: "Os: Windows" + color: AEB1C2 + description: Is Windows-specific + + - name: "Os: Mac" + color: AEB1C2 + description: Is Mac-specific + + - name: "Os: Linux" + color: AEB1C2 + description: Is Linux-specific + + - name: "Skip-Changelog" + color: AEB1C2 + description: Skip changelog in release tag + + - name: "help wanted" + color: 008672 + description: Help wanted + + - name: "CI: Template Sync" + color: AEB1C2 + description: Sync with upstream template diff --git a/.github/workflows/draft-release-tag.yml b/.github/workflows/draft-release-tag.yml new file mode 100644 index 0000000..7d1aafb --- /dev/null +++ b/.github/workflows/draft-release-tag.yml @@ -0,0 +1,24 @@ +name: Release Drafter + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + contents: write + pull-requests: read + + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v6 + with: + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/first-time-contributor.yml b/.github/workflows/first-time-contributor.yml new file mode 100644 index 0000000..74c9e71 --- /dev/null +++ b/.github/workflows/first-time-contributor.yml @@ -0,0 +1,18 @@ +name: Greet first time contributors + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Thank you for your first contribution! πŸ₯³" + pr-message: "Thank you for your first contribution! πŸ₯³" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..e421977 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,15 @@ +name: Labeler + +on: [pull_request] + +# This workflow will require write permissions on pull requests +# 1. Repository Settings -> Actions -> General -> Workflow permissions +# Check "Read and write permissions" + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/sync-template.yml b/.github/workflows/sync-template.yml new file mode 100644 index 0000000..36926bd --- /dev/null +++ b/.github/workflows/sync-template.yml @@ -0,0 +1,51 @@ +name: Sync with upstream template + +on: + schedule: + - cron: "0 0 * * 6" # Weekly on Saturday + workflow_dispatch: + +env: + UPSTREAM_BRANCH: main + UPSTREAM_REPO: caffeine-addictt/template + +# Setup +# 1. Ensure you have a PAT with "contents:write", "workflows:write" and "metadata:read" permissions +# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token +# +# 2. Write the PAT to the "PERSONAL_ACCESS_TOKEN" secret +# https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository +# +# 3. Ensure that GHactions can write Pull Requests (PRs) to the repository +# Repository Settings -> Actions -> General -> Workflow permissions +# Check "Allow GitHub Actions to create and approve pull requests" + +jobs: + repo-sync: + runs-on: ubuntu-latest + + # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + if: github.repository != env.UPSTREAM_REPO + # https://github.com/actions/checkout#usage + with: + # uncomment if you use submodules within the source repository + # submodules: true + token: ${{ secrets.GITHUB_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }} + + - name: actions-template-sync + uses: AndreasAugustin/actions-template-sync@v2 + if: github.repository != env.UPSTREAM_REPO + with: + github_token: ${{ secrets.GITHUB_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }} + source_repo_path: ${{ env.UPSTREAM_REPO }} + upstream_branch: ${{ env.UPSTREAM_BRANCH }} + pr_title: "[CI] Sync with upstream template" + pr_body: "Merging https://github.com/${SOURCE_REPO_PATH}/commit/${TEMPLATE_GIT_HASH}.This PR was automatically generated by the CI workflow." + pr_labels: "CI: Template Sync,Skip-Changelog" diff --git a/.github/workflows/test-worker.yml b/.github/workflows/test-worker.yml new file mode 100644 index 0000000..46f2397 --- /dev/null +++ b/.github/workflows/test-worker.yml @@ -0,0 +1,106 @@ +name: Run Test Suite + +on: + push: + pull_request: + workflow_dispatch: + +defaults: + run: + shell: bash + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +jobs: + # This test suite will run for every language version for every OS defined in the matrix + tests-os-matrix: + name: "${{ matrix.language_version }} on ${{ matrix.os }}" + runs-on: "${{ matrix.os }}-latest" + + strategy: + fail-fast: false + matrix: + os: + - ubuntu + - windows + - macos + # Place your language versions you want to test + language_version: ["v1.0.0", "v2.0.0"] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Setup your language (This is specific to each language) + # - name: Set up language ${{ matrix.language_version }} + # uses: actions/setup-python@v5 + # with: + # language-version: ${{ matrix.language_version }} + + - name: Install dependencies + run: | + set -xe + echo "Installed dependencies" + # python -m pip install -r requirements.txt (for example) + + - name: Build project + run: | + set -xe + echo "Building" + # Place your code to build your project here + + - name: Testing + run: | + set -xe + echo "Testing project" + # Place your code to test your project here + + # This test will run once + tests: + name: "Testing" + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Setup your language (This is specific to each language) + # - name: Set up language ${{ matrix.language_version }} + # uses: actions/setup-python@v5 + # with: + # language-version: ${{ matrix.language_version }} + + - name: Install dependencies + run: | + set -xe + echo "Installed dependencies" + # python -m pip install -r requirements.txt (for example) + + - name: Build project + run: | + set -xe + echo "Building" + # Place your code to build your project here + + - name: Testing + run: | + set -xe + echo "Testing project" + # Place your code to test your project here + + # It is recommended to require this check to pass before merging a pull request + check: + if: always() + name: Tests Successful + runs-on: ubuntu-latest + needs: [tests-os-matrix, tests] + + steps: + - name: Whether the whole test suite passed + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..71cbebf --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,20 @@ +abstract: This is my awesome software. It does very much. +authors: + - alias: Alex + family-names: Ng + given-names: Jun Xiang + orcid: https://orcid.org/0009-0001-1641-9397 +identifiers: + - type: url + value: https://github.com/{{REPOSITORY}}/releases/tag/v1.0.0 + description: The GitHub release URL of tag v1.0.0. +cff-version: 1.2.0 +date-released: yyyy-mm-dd +keywords: + - +license: MIT +message: If you use this software, please cite it using these metadata. +repository-code: https://github.com/{{REPOSITORY}} +title: thread +type: software +version: 1.0.1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4f642d3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jun Xiang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..69b7162 --- /dev/null +++ b/README.md @@ -0,0 +1,153 @@ + + + + + + + +
+ + [![Forks][forks-shield]][forks-url] + [![Stargazers][stars-shield]][stars-url] + [![MIT License][license-shield]][license-url] + +
+ + +
+
+ + Logo + + +

{{PROJECT_NAME}}

+ +

+ {{PROJECT_SHORT_DESCRIPTION}} +
+ Explore the docs Β» +
+
+ Report Bug + Β· + Request Feature +

+
+ + + + +## About The Project + +![Social Card](images/socialcard.png) + +{{PROJECT_LONG_DESCRIPTION}} + +

(back to top)

+ + + + +## Getting Started + +This is an example of how you can set up your project locally. +To get a local copy up and running follow these simple example steps. + +### Prerequisites + +* + +### Installation + +_Below is an example of how you can install and use {{PROJECT_NAME}}._ + +1. +2. + +

(back to top)

+ + + + +## Documentation + +Our docs are [here]({{PROJECT_DOCUMENTATION_URL}})! + +See the [open issues](https://github.com/{{REPOSITORY}}/issues) for a full list of proposed features (and known issues). + +

(back to top)

+ + + + +## Contributing + +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. ( ΛΆΛ†α—œΛ†Λ΅ ) + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +Don't forget to give the project a star! Thanks again! + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +

(back to top)

+ + + + +## License + +Distributed under the MIT License. See [LICENSE.txt](./LICENSE.txt) for more information. + +

(back to top)

+ + + + +## Contact + +Alex - [contact@ngjx.org](mailto:contact@ngjx.org) + +

(back to top)

+ + + + +## Acknowledgments + +* [Repository Template](https://github.com/caffeine-addictt/template) +* [Choose an Open Source License](https://choosealicense.com) +* [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet) +* [Malven's Flexbox Cheatsheet](https://flexbox.malven.co/) +* [Malven's Grid Cheatsheet](https://grid.malven.co/) +* [Img Shields](https://shields.io) + +

(back to top)

+ + + + + +[forks-shield]: https://img.shields.io/github/forks/{{REPOSITORY}}.svg?style=for-the-badge +[forks-url]: https://github.com/{{REPOSITORY}}/network/members +[stars-shield]: https://img.shields.io/github/stars/{{REPOSITORY}}.svg?style=for-the-badge&color=yellow +[stars-url]: https://github.com/{{REPOSITORY}}/stargazers +[license-shield]: https://img.shields.io/github/license/{{REPOSITORY}}.svg?style=for-the-badge +[license-url]: https://github.com/{{REPOSITORY}}/blob/master/LICENSE.txt diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..2873a56 --- /dev/null +++ b/setup.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +# Ask for name +read -p "Name? (This will go on the LICENSE) +=> " name + +# Ask for email +read -p "Email? +=> " email + +# Ask for username +read -p "Username? (https://github.com/) +=> " username + +# Ask for repository +read -p "Repository? (https://github.com/$username/ +=> " repository + +# Ask for project name +read -p "Project name? +=> " proj_name + +# Ask for project description +read -p "Short description? +=> " proj_short_desc + +read -p "Long description? +=> " proj_long_desc + +# Ask for docs url +read -p "Documentation URL? +=> " docs_url + +# ===== Log ===== # +echo +echo +echo "===== Log =====" +echo "Name: $name" +echo "Email: $email" +echo "Username: $username" +echo "Repository: $repository" +echo "Project name: $proj_name" +echo "Project short description: $proj_short_desc" +echo "Project long description: $proj_long_desc" +echo "Docs URL: $docs_url" +echo "================" + +# Ask for confirmation +while true; do + read -p "Confirm? (y/n) +=> " confirm + case $confirm in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac +done + +# Write files +echo +echo +echo "Writing files..." + +# Writing general stuff +find ./ -type f \( -iname CODEOWNERS -o -iname CITATION.cff -o -iname \*.md \) -print0 | xargs -0 sed -i -e "s/{{REPOSITORY}}/$username\/$repository/g" \ + -e "s/{{PROJECT_NAME}}/$proj_name/g" \ + -e "s/{{PROJECT_SHORT_DESCRIPTION}}/$proj_short_desc/g" \ + -e "s/{{PROJECT_LONG_DESCRIPTION}}/$proj_long_desc/g" \ + -e "s/{{DOCS_URL}}/$docs_url/g" \ + -e "s/assignees: caffeine-addictt/assignees: $username/g" \ + -e "s/contact@ngjx.org/$email/g" + +# Write License +sed -i -e "s/Jun Xiang/$name/g" ./LICENSE + +# Write CODEOWNERS +sed -i -e "s/caffeine-addictt/$username/g" .github/CODEOWNERS + +# Write README +sed -i -e "s/Alex/$name/g" README.md + +# Optional keep up-to-date +read -p "Would you like to keep up-to-date with the template? (y/n) +=> " up_to_date + +case $up_to_date in +[Yy]*) { + echo "Writing ignore file..." + echo ".github/ISSUE_TEMPLATE/* +.github/CODEOWNERS +.github/CODESTYLE.md +.github/PULL_REQUEST_TEMPLATE.md +.github/SECURITY.md +CITATION.cff +LICENSE +README.md" >>.templatesyncignore + echo "You can view more configuration here: https://github.com/AndreasAugustin/actions-template-sync" +} ;; +*) { + echo "Removing syncing workflow..." + rm .github/workflows/sync-template.yml +} ;; +esac + +read -p "Would you like to keep this setup script? (y/n) +=> " keep_script + +case $keep_script in +[Yy]*) { + echo "Removing setup script..." + rm ./setup.sh +} ;; +*) echo "Okay." ;; +esac + +echo +echo "Done! +If you encounter any issues, please report it here: https://github.com/caffeine-addictt/template/issues/new?assignees=caffeine-addictt&labels=Type%3A+Bug&projects=&template=1-bug-report.md&title=[Bug]+"