From 27338b80b28979c5d73c32967c0dec01ac167e38 Mon Sep 17 00:00:00 2001 From: Chris Blanquera Date: Thu, 13 Jun 2024 15:26:11 +0800 Subject: [PATCH] issue and pr templates --- .github/ISSUE_TEMPLATE/01-feature-request.yml | 28 +++++++++ .github/ISSUE_TEMPLATE/02-bug-report.yml | 58 +++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/pull_request_template.md | 32 ++++++++++ .github/workflows/comment.yml | 17 ++++++ .github/workflows/stale.yml | 18 ++++++ .github/workflows/test.yml | 17 ++++++ package.json | 1 + 8 files changed, 172 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/01-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/02-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/comment.yml create mode 100644 .github/workflows/stale.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/ISSUE_TEMPLATE/01-feature-request.yml b/.github/ISSUE_TEMPLATE/01-feature-request.yml new file mode 100644 index 0000000..bab5d3b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-feature-request.yml @@ -0,0 +1,28 @@ +name: Feature Request +description: Create a feature request +labels: ['feature'] +body: + - type: markdown + attributes: + value: Thanks for taking the time to file a feature request! Please fill out this form as completely as possible. + - type: markdown + attributes: + value: 'Feature requests will be converted to the GitHub Discussions "Ideas" section.' + - type: textarea + attributes: + label: Describe the feature you'd like to request + description: A clear and concise description of what you want and what your use case is. + validations: + required: true + - type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/02-bug-report.yml b/.github/ISSUE_TEMPLATE/02-bug-report.yml new file mode 100644 index 0000000..4198310 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-bug-report.yml @@ -0,0 +1,58 @@ +name: Bug Report +description: Create a bug report +labels: ['bug'] +body: + - type: markdown + attributes: + value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible. + - type: input + attributes: + label: What version of Temple are you using? + description: 'For example: 0.0.13' + validations: + required: true + - type: input + attributes: + label: What OS are you experiencing this issue? + description: 'For example: Windows 10 Pro, MacOS Monterey, Ubuntu 23.10' + validations: + required: true + - type: input + attributes: + label: What Browser are you experiencing this issue? + description: 'For example: Chrome 125.0.6422.141, Safari 17.4.1, Firefox 128.0' + validations: + required: true + - type: textarea + attributes: + label: Describe the Bug + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + attributes: + label: To Reproduce + description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below. + validations: + required: true + - type: input + attributes: + label: Include git repo/fork so we can easily reproduce the issue + description: 'For example: https://github.com/username/repo.git' + validations: + required: false + - type: markdown + attributes: + value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear. + - type: markdown + attributes: + value: Contributors should be able to follow the steps provided in order to reproduce the bug. + - type: markdown + attributes: + value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ 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..4ae92ad --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,32 @@ + + +## What is this PR for? + + - [ ] Just updating content and/or documentation + - [ ] This fixes issue #_____ + - [ ] Spot fix *(no issue #)* + - [ ] Merging WIP feature #_____ + - [ ] Merging done feature #_____ + - [ ] This is a merge from a version branch + - [ ] Adding/Updating tests + - [ ] This is a conflict resolution + - [ ] This is a branch cleanup + - [ ] Other: ________________ + +## I verify that... + + - [ ] I have logged my time in the commits + - [ ] I have logged my time in this PR + - [ ] I have tagged all the relevant issues + - [ ] I am using VS Code for type checks and linting, or + - [ ] I have ran `npm run test` with no errors + - [ ] I have manually checked that this bug or feature is working diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml new file mode 100644 index 0000000..7d0fdcf --- /dev/null +++ b/.github/workflows/comment.yml @@ -0,0 +1,17 @@ +name: Auto Comment +on: [issues, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - + if: github.event.pull_request.head.repo.full_name == github.repository + uses: wow-actions/auto-comment@v1.1.2 + with: + GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} + issuesOpened: | + 👋 @{{ author }} + Thank you for raising an issue! Please make sure you have given as much context as possible. Screenshots are appreciated! + pullRequestOpened: | + 👋 @{{ author }} + Thank you for raising your pull request. Please make sure you have followed our contributing guidelines. If you haven't done so in your commits, please reference the issue numbers as well as the time you spent on this in the comments below so we can track time. example `fixed button #1001 3h` \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c9a26be --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,18 @@ +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" +jobs: + close-issues: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9.0.0 + with: + days-before-issue-stale: 30 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.API_TOKEN_GITHUB }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2c5994f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Idea Test Suite +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install dependencies + run: yarn + - name: Building code + run: yarn build + - name: Run tests + run: yarn test \ No newline at end of file diff --git a/package.json b/package.json index 74732b8..127c470 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build:loader": "yarn --cwd packages/temple-loader build", "build:dev": "yarn --cwd packages/temple-dev build", "build:web": "yarn --cwd packages/temple-web build", + "test": "yarn test:parser && yarn test:compiler", "test:parser": "yarn --cwd packages/temple-parser test", "test:compiler": "yarn --cwd packages/temple-compiler test", "dev:express": "yarn --cwd examples/with-express dev",