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: + 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. 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 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 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 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