From c14ad4b908f25aaa99113a98ff39d9298cc79342 Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:51:59 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=91=B7=20add=20PR=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/.github/pull_request_template.md | 72 ++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/.github/pull_request_template.md diff --git a/.github/.github/pull_request_template.md b/.github/.github/pull_request_template.md new file mode 100644 index 000000000..b28229d55 --- /dev/null +++ b/.github/.github/pull_request_template.md @@ -0,0 +1,72 @@ +# Summary + +Please provide a brief summary of the changes and the issue number this PR addresses. + +Related Issue: # (issue number) + +## Change Type + +- [ ] Bug Fix +- [ ] Refactor +- [ ] New Feature +- [ ] Breaking Change +- [ ] Documentation Update +- [ ] Performance Improvement +- [ ] Other + +# Checklist + +- [ ] My code follows this project's style guidelines +- [ ] I've reviewed my own code +- [ ] I've added comments for any hard-to-understand areas +- [ ] I've updated the documentation if necessary +- [ ] My changes generate no new warnings +- [ ] I've added tests that prove my fix is effective or my feature works +- [ ] All unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published + +# Additional Information + +Any additional information or context about the PR. + +# Branch Naming + +Make sure your branch name follows the pattern: `features/`, `fixes/`, or `releases/`. + +**Note**: The person creating the PR is responsible for merging and deleting the branch. Ensure the code has been tested, commented, linted, and documents updated if needed. +======= +## What's the Branch For? + +- **Type of Change**: My branch name starts with `features/`, `fixes/`, or `releases/`. +- **Who Merges**: If I made this PR, I'll merge it and delete the branch after that. + +## What Are You Changing? + +Tell us what you're changing and why. Also, if it fixes an issue, mention that issue number. + +Fixes Issue # (if any) + +## What Kind of Change Is It? + +- Fixing a bug +- Adding a new feature +- Making a big change that could break things +- Updating the documentation + +## Did You Test It? + +Tell us how you tested your changes. If you didn't test, please say so. + +## Checklist + +- My code is neat and clean +- I've reviewed my own code to make sure it's good +- I've added comments to tricky parts in the code +- I've updated any needed documentation +- My changes don't cause any new warnings +- I've added tests to prove my changes work +- All tests pass with my changes + +---------- + +**Note**: Please remove this text before you submit your PR. \ No newline at end of file From d514adc7be11a0127ab37cbfb6026148d7235d88 Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:52:23 +0700 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=9A=A7=20=20add=20bug=20report=20temp?= =?UTF-8?q?late?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/.github/ISSUE_TEMPLATE/bug_report.md | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/.github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/.github/ISSUE_TEMPLATE/bug_report.md b/.github/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..919492fe2 --- /dev/null +++ b/.github/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,22 @@ +--- +name: Bug Report +about: Report a bug to help us improve +title: "" +labels: bug, needs-review +assignees: "" +--- + +Thank you for reporting this bug. Please provide as much detail as you can. + +### Required Environment Info + +- Browser Version: +- SDK Version: +- Package: + +### Required Problem Description + +#### Steps to Reproduce: + +#### Code or Error Messages: + From 5d0d1fa4d854889a9e19b9f48c7169f5b1354791 Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:52:44 +0700 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=9A=A7=20=20add=20feature=20request?= =?UTF-8?q?=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/.github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/.github/ISSUE_TEMPLATE/feature_request.md b/.github/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..caca382ad --- /dev/null +++ b/.github/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature Request +about: Suggest a new feature for the project +title: "Feature: " +labels: feature-request, needs-review +assignees: "" +--- + +**Problem You're Facing** +Describe the problem you're trying to solve. + +**Proposed Solution** +What would you like to see happen? + +**Alternatives Considered** +Any other solutions or features you've considered. + +**Additional Info** +Any extra context or screenshots. From 78a03efb88b4f596a6c570764f241bfcad8ca92f Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:53:10 +0700 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=91=B7=20branch=20name=20check=20gith?= =?UTF-8?q?ub=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.github/workflows/check_branch_name.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/.github/workflows/check_branch_name.yml diff --git a/.github/.github/workflows/check_branch_name.yml b/.github/.github/workflows/check_branch_name.yml new file mode 100644 index 000000000..bf9aade96 --- /dev/null +++ b/.github/.github/workflows/check_branch_name.yml @@ -0,0 +1,21 @@ +name: Check Branch Name +on: + push: + branches-ignore: + - 'main' + - 'master' + - 'development' + - 'dev' + - 'develop' + +jobs: + check-branch-name: + runs-on: ubuntu-latest + steps: + - name: Check Branch Name + run: | + BRANCH_NAME=${GITHUB_REF#refs/heads/} + if [[ ! $BRANCH_NAME =~ ^(features/|fixes/|releases/) ]]; then + echo "Invalid branch name. Must start with 'features/', 'fixes/', or 'releases/'." + exit 1 + fi From f418d75f5b0194ce4141db52e4b085f5cd221999 Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:53:29 +0700 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=91=B7=20stale=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/.github/workflows/mark_stale.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/.github/workflows/mark_stale.yml diff --git a/.github/.github/workflows/mark_stale.yml b/.github/.github/workflows/mark_stale.yml new file mode 100644 index 000000000..cd006a57e --- /dev/null +++ b/.github/.github/workflows/mark_stale.yml @@ -0,0 +1,22 @@ +name: Mark Inactive Issues and PRs + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue will be closed due to inactivity." + stale-pr-message: "This PR will be closed due to inactivity." + stale-issue-label: "inactive-issue" + stale-pr-label: "inactive-pr" + days-before-stale: 30 From 636de86b27347f8fa16bc482979a6516cdc0516f Mon Sep 17 00:00:00 2001 From: aboudjem Date: Fri, 1 Sep 2023 19:54:13 +0700 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=91=B7=20push=20check=20github=20acti?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/.github/workflows/push_check.yml | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/.github/workflows/push_check.yml diff --git a/.github/.github/workflows/push_check.yml b/.github/.github/workflows/push_check.yml new file mode 100644 index 000000000..0beb7fd0d --- /dev/null +++ b/.github/.github/workflows/push_check.yml @@ -0,0 +1,44 @@ +name: Test workflow +on: push +jobs: + lint: + name: Lint sources + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + + steps: + - name: Checkout + uses: 'actions/checkout@master' + + - name: Set Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Lint sources + run: + yarn run lint + + unit_test: + name: Unit tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + + steps: + - name: Checkout + uses: 'actions/checkout@master' + + - name: Set Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: yarn install --frozen-lockfile && yarn build + - name: Run tests + run: yarn test \ No newline at end of file