Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
add github-actions
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
  • Loading branch information
ckotzbauer committed Sep 11, 2020
1 parent b91a5cd commit 94ecd71
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/label-commands.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
21 changes: 21 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
@@ -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." }
]
30 changes: 30 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 11 additions & 0 deletions .github/workflows/create-default-labels.yml
Original file line number Diff line number Diff line change
@@ -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 }}
21 changes: 21 additions & 0 deletions .github/workflows/label-issues.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
10 changes: 10 additions & 0 deletions .github/workflows/size-label.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
":semanticCommitScopeDisabled"
],
"labels": [
"dependencies"
"kind/dependencies"
],
"reviewers": [
"ckotzbauer"
]
}

0 comments on commit 94ecd71

Please sign in to comment.