From 3c4669c4b762909b003a7e24e9908d12c38c0632 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 30 Aug 2024 18:10:12 +0500 Subject: [PATCH] ci: add github workflows and docs --- .github/ISSUE_TEMPLATE/bug_report.md | 34 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 37 +++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 29 ++++++++++++++++++ .github/dependabot.yml | 9 ++++++ .github/workflows/codeql-analysis.yml | 19 ++++++++++++ .github/workflows/pr.yml | 7 +++++ .github/workflows/release.yml | 14 +++++++++ 7 files changed, 149 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/pr.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f1b5fc3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: "🐛 Bug Report" +about: Report a reproducible bug or regression. +title: 'Bug title here' +labels: bug +assignees: 'Your GitHub username here' + +--- + +## Current Behavior + + +Currently, [describe the specific issue that is occurring], and it leads to [describe any negative impact, such as errors or unwanted behavior]. + +## Expected Behavior + + +The expected behavior is [describe what should happen instead], and it should [mention how this fixes the issue]. + +## Steps to Reproduce the Problem + +1. [First step to reproduce the issue] +2. [Second step] +3. [Third step] +4. [Add more steps as necessary] + +## Environment + +- Version: + - Example: v1.2.3 +- Platform: + - Example: macOS 12.5 +- Node.js Version: + - Example: v18.19.1 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..a672536 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,37 @@ +--- +name: 🌈 Feature request +about: Suggest an amazing new idea for this project +title: 'Add your feature title here' +labels: enhancement +assignees: 'Your GitHub username here' + +--- + +## Feature Request + +**Is your feature request related to a problem? Please describe.** + +Currently, there is no way to [describe the issue or challenge], and this is causing [describe any impact or inconvenience caused by the issue]. + +**Describe the solution you'd like** + +The solution should [briefly describe the feature you are proposing], which will help [explain the impact or improvement]. It should ideally [mention any specific behavior or functionality expected]. + +**Describe alternatives you've considered** + +I have considered [mention any alternative solutions], but they [explain why those solutions are not ideal or why your suggested solution is better]. + +## Are you willing to resolve this issue by submitting a Pull Request? + + + +- [ ] Yes, I have the time, and I know how to start. +- [ ] Yes, I have the time, but I don't know how to start. I would need guidance. +- [ ] No, I don't have the time, although I believe I could do it if I had the time... +- [ ] No, I don't have the time and I wouldn't even know how to start. + + \ 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..2def4b1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +## Description of Changes + +This PR introduces [describe feature or fix]. It addresses [issue] by [briefly describe the fix or feature]. The current behavior is [describe the problem], and the new behavior is [describe the solution or improvement]. + +## Related Issues + +Fixes #0000. + +## How Has This Been Tested? + +This change has been tested by: +1. Running `npm run test` to ensure all unit tests pass. +2. Performing manual testing in [testing environment] to verify the behavior. +3. [If applicable] Running integration tests to ensure no regressions were introduced. + +## Screenshots or Demonstrations + +[Include screenshots or video links here, if necessary.] + +## Pull Request Checklist + +- [ ] The code is up-to-date with the `main` branch +- [ ] I have performed a self-review of my code +- [ ] `npm run lint` passes with this change +- [ ] `npm run test` passes with this change +- [ ] Tests have been added/updated for new functionality +- [ ] Documentation has been updated to reflect this change (if applicable) +- [ ] The commits follow the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/) +- [ ] This pull request links relevant issues as `Fixes #0000` \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..50a3d03 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + target-branch: "main" + labels: + - "dependencies" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..e3eaf2e --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,19 @@ +name: "CodeQL" + +permissions: + security-events: write + actions: read + contents: read + +on: + push: + branches: [main] + pull_request: + # The branches below must be a subset of the branches above + branches: [main] + schedule: + - cron: "36 7 * * 6" + +jobs: + analyze: + uses: dev-ahmadbilal/reuseble-workflows/.github/workflows/codeql-analysis.yml@main diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..e98cb8a --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,7 @@ +name: Pull Request + +on: [pull_request] + +jobs: + build: + uses: dev-ahmadbilal/reuseble-workflows/.github/workflows/pr.yml@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fc15dab --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,14 @@ +name: Release +on: + push: + branches: + - main +jobs: + release: + permissions: + contents: write + issues: write + pull-requests: write + uses: dev-ahmadbilal/reuseble-workflows/.github/workflows/release.yml@main + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}