Migrate from GitHub HashiBot to GitHub Actions

GitHub HashiBot is being decommissioned. This migrates the crash issue labeling and waiting-reply label removal to GitHub Actions. The stale issue handling is not migrated as neither behavior appears to be actively in use.
This commit is contained in:
Brian Flad 2021-06-07 15:12:23 -04:00
parent dd69252a18
commit 979199696b
4 changed files with 92 additions and 112 deletions

View File

@ -4,7 +4,8 @@
# backport/1.8:
# beta/1.8:
# blocks-release:
# crash:
crash:
- 'panic:'
# do-not-merge:
# help-wanted:
# needs-discussion:
@ -13,76 +14,76 @@
# pr/dependencies:
# pr/needs-rebase:
# pr/needs-tests:
theme/acls:
- '(acl|ACL)'
# theme/acls:
# - '(acl|ACL)'
# theme/agent-cache:
# theme/api:
theme/catalog:
- '(catalog|Catalog)'
theme/certificates:
- '(certificate|CA|Certificate\sAuthority)'
theme/cli:
- '(command-line|commandline|cli|command)'
theme/config:
- '(configuration_files|options#configuration_files)'
theme/connect:
- '(Connect|connect|service\smesh|mesh|proxy|gateway)'
theme/consul-nomad:
- '(nomad|Nomad)'
theme/consul-terraform-sync:
- '(nia|NIA|Network\sInfrastructure\sAutomation)'
theme/consul-vault:
- '(vault|Vault)'
# theme/catalog:
# - '(catalog|Catalog)'
# theme/certificates:
# - '(certificate|CA|Certificate\sAuthority)'
# theme/cli:
# - '(command-line|commandline|cli|command)'
# theme/config:
# - '(configuration_files|options#configuration_files)'
# theme/connect:
# - '(Connect|connect|service\smesh|mesh|proxy|gateway)'
# theme/consul-nomad:
# - '(nomad|Nomad)'
# theme/consul-terraform-sync:
# - '(nia|NIA|Network\sInfrastructure\sAutomation)'
# theme/consul-vault:
# - '(vault|Vault)'
# theme/contributing:
theme/dns:
- '(dns|DNS)'
theme/envoy/xds:
- '(envoy|xds|xDS|XDS|Envoy)'
theme/federation-usability:
- '(WAN|wan|wan_fed|federation|fed)'
# theme/dns:
# - '(dns|DNS)'
# theme/envoy/xds:
# - '(envoy|xds|xDS|XDS|Envoy)'
# theme/federation-usability:
# - '(WAN|wan|wan_fed|federation|fed)'
# theme/go-modules:
theme/health-checks:
- '(health-check|healthcheck|health\scheck)'
theme/ingress-gw:
- '(ingress|ingress-gateway|Ingress)'
# theme/health-checks:
# - '(health-check|healthcheck|health\scheck)'
# theme/ingress-gw:
# - '(ingress|ingress-gateway|Ingress)'
# thementernal-cleanup:
theme/internals:
- '(raft|RAFT|SERF|serf|lifeguard|Lifeguard|gossip)'
theme/kubernetes:
- '(kubernetes|k8s|helm)'
theme/mesh-gw:
- 'mesh'
# theme/internals:
# - '(raft|RAFT|SERF|serf|lifeguard|Lifeguard|gossip)'
# theme/kubernetes:
# - '(kubernetes|k8s|helm)'
# theme/mesh-gw:
# - 'mesh'
# theme/operator-usability:
theme/packaging:
- '(nix|Nix|RPM|rpm|DEB|deb|repository|systemd|upstart|Upstart|SystemD|brew|homebrew|choco|chocolatey)'
theme/performance:
- '(performance|requests\sper\ssecond)'
theme/service-metadata:
- '(meta-data|meta)'
theme/streaming:
- '(stream|streaming)'
theme/telemetry:
- '(circonis|statsd|dogstatsd|datadog|DataDog|prometheus|Prometheus|metric|metrics|trace|tracing)'
theme/terminating-gw:
- 'terminating'
theme/testing:
- '(unit\stest|functional\stest|integration\stest|e2e|E2E)'
theme/tls:
- '(mtls|mTLS|tls|TLS)'
theme/ui:
- '(browser|chrome|firefox|IE|Chrome)'
theme/windows:
- '(windows|Windows|Microsoft|microsoft)'
# theme/packaging:
# - '(nix|Nix|RPM|rpm|DEB|deb|repository|systemd|upstart|Upstart|SystemD|brew|homebrew|choco|chocolatey)'
# theme/performance:
# - '(performance|requests\sper\ssecond)'
# theme/service-metadata:
# - '(meta-data|meta)'
# theme/streaming:
# - '(stream|streaming)'
# theme/telemetry:
# - '(circonis|statsd|dogstatsd|datadog|DataDog|prometheus|Prometheus|metric|metrics|trace|tracing)'
# theme/terminating-gw:
# - 'terminating'
# theme/testing:
# - '(unit\stest|functional\stest|integration\stest|e2e|E2E)'
# theme/tls:
# - '(mtls|mTLS|tls|TLS)'
# theme/ui:
# - '(browser|chrome|firefox|IE|Chrome)'
# theme/windows:
# - '(windows|Windows|Microsoft|microsoft)'
# thinking:
# type/bug:
type/ci:
- '(circle|circleci|CircleCI)'
# type/ci:
# - '(circle|circleci|CircleCI)'
# type/crash:
type/docs:
- '(docs\/|docs|consul\.io)'
# type/docs:
# - '(docs\/|docs|consul\.io)'
# type/docs-cherrypick:
type/enhancement:
- '(new\sfeature|feature|feature\srequest)'
# type/enhancement:
# - '(new\sfeature|feature|feature\srequest)'
# type/good-first-issue:
# type/question:
# type/umbrella-☂️:

View File

@ -0,0 +1,15 @@
name: Issue Comment Created
on:
issue_comment:
types: [created]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: |
waiting-reply

15
.github/workflows/issue-labeler.yml vendored Normal file
View File

@ -0,0 +1,15 @@
name: Issue Labeler
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/issue-labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-labeler.yml

View File

@ -1,51 +0,0 @@
behavior "regexp_issue_labeler" "panic_label" {
regexp = "panic:"
labels = ["crash"]
}
behavior "remove_labels_on_reply" "remove_stale" {
labels = ["waiting-reply"]
}
poll "stale_issue_closer" "waiting_reply_closer" {
schedule = "0 0 2 * * *"
no_reply_in_last = "480h" # 20 days
max_issues = 50
sleep_between_issues = "5s"
labels = ["waiting-reply-🤖"]
message = <<-EOF
Hey there,
This issue has been automatically closed because there hasn't been any activity for at least _20_ days.
If you are still experiencing problems, or still have questions, feel free to [open a new one](https://github.com/hashicorp/consul/issues/new) :+1:.
EOF
}
poll "stale_issue_closer" "old_issue_closer" {
schedule = "0 0 3 * * *"
no_reply_in_last = "1s"
max_issues = 100
sleep_between_issues = "5s"
labels = ["close-old-issue-🤖"]
message = <<-EOF
Hey there,
This issue was reported on a version of Consul that is quite old. Based on the volume of changes since that version we encourage you to try reproducing with the latest version of Consul. If you feel the issue is critical and on an older version of Consul, or still exists in the current version, feel free to [open a new issue](https://github.com/hashicorp/consul/issues/new) :+1:.
EOF
}
# poll "closed_issue_locker" "locker" {
# schedule = "0 0 4 * * *"
# closed_for = "720h" # 30 days
# max_issues = 250
# sleep_between_issues = "1m"
#
# message = <<-EOF
# Hey there,
#
# This issue has been automatically locked because it is closed and there hasn't been any activity for at least _30_ days.
#
# If you are still experiencing problems, or still have questions, feel free to [open a new one](https://github.com/hashicorp/consul/issues/new) :+1:.
# EOF
# }