diff --git a/.github/label-commands.json b/.github/label-commands.json new file mode 100644 index 0000000..04eba5c --- /dev/null +++ b/.github/label-commands.json @@ -0,0 +1,16 @@ +{ + "commands": [ + { "command": "approved", "arg": "", "action": "add-label", "label": "approved", "dispatch": "approved" }, + { "command": "approved", "arg": "cancel", "action": "remove-label", "label": "approved" }, + { "command": "hold", "arg": "", "action": "add-label", "label": "hold" }, + { "command": "hold", "arg": "cancel", "action": "remove-label", "label": "hold" }, + { "command": "label", "arg": "(.*)", "action": "add-label", "label": "$1" }, + { "command": "remove-label", "arg": "(.*)", "action": "remove-label", "label": "$1" }, + { "command": "kind", "arg": "(bug|feature|documentation|test|cleanup)", "action": "add-label", "label": "kind/$1" }, + { "command": "lifecycle", "arg": "(stale|frozen)", "action": "add-label", "label": "lifecycle/$1" }, + { "command": "remove-lifecycle", "arg": "(stale|frozen)", "action": "remove-label", "label": "lifecycle/$1" } + ], + "allowedUsers": [ + "ckotzbauer" + ] +} diff --git a/.github/labels.json b/.github/labels.json new file mode 100644 index 0000000..d5444ea --- /dev/null +++ b/.github/labels.json @@ -0,0 +1,21 @@ +[ + { "name": "kind/bug", "color": "#d73a4a", "description": "Categorizes issue or PR as related to a bug." }, + { "name": "kind/feature", "color": "#a2eeef", "description": "Categorizes issue or PR as related to a new feature." }, + { "name": "kind/documentation", "color": "#0075ca", "description": "Categorizes issue or PR as related to documentation." }, + { "name": "kind/test", "color": "#ddc23b", "description": "Categorizes issue or PR as related to tests." }, + { "name": "kind/cleanup", "color": "#ededed", "description": "Categorizes issue or PR as related to cleaning up code, process, or technical debt." }, + { "name": "kind/dependencies", "color": "#ededed", "description": "Pull requests that update a dependency file" }, + { "name": "lifecycle/stale", "color": "#795548", "description": "Denotes an issue or PR has remained open with no activity and has become stale." }, + { "name": "lifecycle/frozen", "color": "#d3e2f0", "description": "Indicates that an issue or PR should not be auto-closed due to staleness." }, + { "name": "size/XS", "color": "#009900", "description": "Denotes a PR that changes 0-9 lines, ignoring generated files." }, + { "name": "size/S", "color": "#77bb00", "description": "Denotes a PR that changes 10-29 lines, ignoring generated files." }, + { "name": "size/M", "color": "#eebb00", "description": "Denotes a PR that changes 30-99 lines, ignoring generated files." }, + { "name": "size/L", "color": "#ee9900", "description": "Denotes a PR that changes 100-499 lines, ignoring generated files." }, + { "name": "size/XL", "color": "#ee5500", "description": "Denotes a PR that changes 500-999 lines, ignoring generated files." }, + { "name": "size/XXL", "color": "#ee0000", "description": "Denotes a PR that changes 1000+ lines, ignoring generated files." }, + { "name": "help wanted", "color": "#008672", "description": "Denotes an issue that needs help from a contributor." }, + { "name": "good first issue", "color": "#7057ff", "description": "Denotes an issue ready for a new contributor." }, + { "name": "approved", "color": "#2fed58", "description": "Indicates a PR has been approved and is ready for merge." }, + { "name": "hold", "color": "#e11d21", "description": "Indicates that a PR should not merge." }, + { "name": "work-in-progress", "color": "#e01dd6", "description": "Indicates that a PR is still in progress." } +] \ No newline at end of file diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..b7e9712 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,30 @@ +name: Merge PRs +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: automerge + uses: "pascalgn/automerge-action@f81beb99aef41bb55ad072857d43073fba833a98" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: "approved,!work-in-progress" + MERGE_METHOD: "rebase" + MERGE_DELETE_BRANCH: "true" diff --git a/.github/workflows/create-default-labels.yml b/.github/workflows/create-default-labels.yml new file mode 100644 index 0000000..61c8684 --- /dev/null +++ b/.github/workflows/create-default-labels.yml @@ -0,0 +1,11 @@ +name: Create default labels +on: issues +jobs: + labels: + name: DefaultLabelsActions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: lannonbr/issue-label-manager-action@2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml new file mode 100644 index 0000000..03f3c33 --- /dev/null +++ b/.github/workflows/label-issues.yml @@ -0,0 +1,21 @@ +name: Label Issues +on: + issue_comment: + types: + - created + - edited + pull_request: + types: + - opened + issues: + types: + - opened +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: "actions/checkout@v2" + - name: label + uses: "ckotzbauer/label-command-action@master" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml new file mode 100644 index 0000000..a83e75f --- /dev/null +++ b/.github/workflows/size-label.yml @@ -0,0 +1,10 @@ +name: Label size of PRs +on: pull_request +jobs: + size-label: + runs-on: ubuntu-latest + steps: + - name: size-label + uses: "pascalgn/size-label-action@851c37f157f7d64e56f41ff5d2d80316299b2d47" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..840ae97 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Close stale issues +on: + schedule: + - cron: "0 0 * * *" +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label with `/remove-lifecycle stale` or comment or this will be closed in 5 days.' + stale-pr-message: 'This pull request is stale because it has been open 90 days with no activity. Remove stale label with `/remove-lifecycle stale` or comment or this will be closed in 5 days.' + stale-issue-label: 'lifecycle/stale' + exempt-issue-labels: 'work-in-progress,lifecycle/frozen' + stale-pr-label: 'lifecycle/stale' + exempt-pr-labels: 'work-in-progress,lifecycle/frozen' + days-before-stale: 90 + days-before-close: 5 diff --git a/renovate.json b/renovate.json index d223fd0..dc7d5d1 100644 --- a/renovate.json +++ b/renovate.json @@ -4,6 +4,9 @@ ":semanticCommitScopeDisabled" ], "labels": [ - "dependencies" + "kind/dependencies" + ], + "reviewers": [ + "ckotzbauer" ] }