diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index ac311633..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -Your issue may already be reported! Please search on the [issue track](https://github.com/go-gorm/gorm/issues) before creating one. - -To report a bug, your issue *have to* include an [GORM playground pull request link](https://github.com/go-gorm/playground), for general questions, please delete below line. - -## GORM Playground Link: https://github.com/go-gorm/playground/pull/1 (change this to your link) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 930ff176..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,11 +0,0 @@ -Make sure these boxes checked before submitting your pull request. - -- [] Do only one thing -- [] No API-breaking changes -- [] New code/logic commented & tested (important) - -For significant changes like big bug fixes, new features, please open an issue to make an agreement on an implementation design/plan first before starting it. - -### What did this pull request do? - -### Use Case diff --git a/.github/labels.json b/.github/labels.json new file mode 100644 index 00000000..8b1ce849 --- /dev/null +++ b/.github/labels.json @@ -0,0 +1,139 @@ +{ + "labels": { + "critical": { + "name": "type:critical", + "colour": "#E84137", + "description": "critical questions" + }, + "question": { + "name": "type:question", + "colour": "#EDEDED", + "description": "general questions" + }, + "with_playground": { + "name": "type:with reproduction steps", + "colour": "#00ff00", + "description": "with reproduction steps" + }, + "without_playground": { + "name": "type:missing reproduction steps", + "colour": "#CF2E1F", + "description": "missing reproduction steps" + }, + "has_pr": { + "name": "type:has pull request", + "colour": "#43952A", + "description": "has pull request" + }, + "not_tested": { + "name": "type:not tested", + "colour": "#CF2E1F", + "description": "not tested" + }, + "tested": { + "name": "type:tested", + "colour": "#00ff00", + "description": "tested" + }, + "breaking_change": { + "name": "type:breaking change", + "colour": "#CF2E1F", + "description": "breaking change" + } + }, + "issue": { + "with_playground": { + "requires": 1, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/github.com\/go-gorm\/playground\/pull\/\\d\\d+/s" + } + ] + }, + "critical": { + "requires": 1, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/(critical|urgent)/i" + }, + { + "type": "titleMatches", + "pattern": "/(critical|urgent)/i" + } + ] + }, + "question": { + "requires": 1, + "conditions": [ + { + "type": "titleMatches", + "pattern": "/question/i" + }, + { + "type": "descriptionMatches", + "pattern": "/question/i" + } + ] + }, + "without_playground": { + "requires": 5, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/^((?!github.com\/go-gorm\/playground\/pull\/\\d\\d+).)*$/s" + }, + { + "type": "titleMatches", + "pattern": "/^((?!question).)*$/s" + }, + { + "type": "descriptionMatches", + "pattern": "/^((?!question).)*$/is" + }, + { + "type": "titleMatches", + "pattern": "/^((?!critical|urgent).)*$/s" + }, + { + "type": "descriptionMatches", + "pattern": "/^((?!critical|urgent).)*$/s" + } + ] + } + }, + "pr": { + "critical": { + "requires": 1, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/(critical|urgent)/i" + }, + { + "type": "titleMatches", + "pattern": "/(critical|urgent)/i" + } + ] + }, + "not_tested": { + "requires": 1, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/\\[\\] Tested/" + } + ] + }, + "breaking_change": { + "requires": 1, + "conditions": [ + { + "type": "descriptionMatches", + "pattern": "/\\[\\] Non breaking API changes/" + } + ] + } + } +} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..1490730b --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,19 @@ +name: "Issue Labeler" +on: + issues: + types: [opened, edited, reopened] + pull_request: + types: [opened, edited, reopened, ready_for_review, synchronize] + +jobs: + triage: + runs-on: ubuntu-latest + name: Label issues and pull requests + steps: + - name: check out + uses: actions/checkout@v2 + + - name: labeler + uses: jinzhu/super-labeler-action@develop + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..6fb714ca --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,21 @@ +name: "Close Missing Playground issues" +on: + schedule: + - cron: "*/10 * * * *" + +jobs: + stale: + runs-on: ubuntu-latest + env: + ACTIONS_STEP_DEBUG: true + steps: + - name: Close Stale Issues + uses: actions/stale@v3.0.7 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue has been automatically marked as stale as it missing playground pull request link, checkout [https://github.com/go-gorm/playground](https://github.com/go-gorm/playground) for details, it will be closed in 2 days if no further activity occurs." + stale-issue-label: "status:stale" + days-before-stale: 0 + days-before-close: 2 + remove-stale-when-updated: true + only-labels: "type:missing reproduction steps"