From 4b25a07bc796c392e95ce9d8b4228e6b3416803b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 14 May 2021 13:49:48 -0400 Subject: [PATCH] Remove GitHub HashiBot configuration For the `closed_issue_locker` behavior, this is a migration to an equivalent action. For the `label_issue_migrater` behavior, this is not replaced and instead it is suggested to use native GitHub functionality for issue transfer. If mostly equivalent behavior is desired via label automation, it may be possible to submit an issue transfer feature request to dessant/label-actions as it is a popular community action or create a new GitHub Action. Please reach out if this is a major issue for your team. For the `remove_labels_on_reply` behavior, it is equivalent except this initial configuration does not make the collaborators distinction. There is a workflow configuration workaround for setting up per-user ignores for any job/step, so if you desire that here please reach out. --- .github/workflows/issue-comment-created.yml | 15 ++++++++ .github/workflows/lock.yml | 23 ++++++++++++ .hashibot.hcl | 39 --------------------- 3 files changed, 38 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/issue-comment-created.yml create mode 100644 .github/workflows/lock.yml delete mode 100644 .hashibot.hcl diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml new file mode 100644 index 000000000..b8c4d6bfa --- /dev/null +++ b/.github/workflows/issue-comment-created.yml @@ -0,0 +1,15 @@ +name: Issue Comment Created Triage + +on: + issue_comment: + types: [created] + +jobs: + issue_comment_triage: + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: | + stale + waiting-reply diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000..ed67648c7 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,23 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '50 1 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2 + with: + github-token: ${{ github.token }} + issue-lock-comment: > + I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues. + + If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. + issue-lock-inactive-days: '30' + pr-lock-comment: > + I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active contributions. + + If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. + pr-lock-inactive-days: '30' diff --git a/.hashibot.hcl b/.hashibot.hcl deleted file mode 100644 index a71a88c91..000000000 --- a/.hashibot.hcl +++ /dev/null @@ -1,39 +0,0 @@ -behavior "remove_labels_on_reply" "remove_stale" { - labels = ["waiting-response", "stale"] - only_non_maintainers = true -} - -poll "label_issue_migrater" "provider_migrater" { - schedule = "0 20 * * * *" - new_owner = env.PROVIDERS_OWNER - repo_prefix = "terraform-provider-" - label_prefix = "provider/" - excluded_label_prefixes = ["backend/", "provisioner/"] - excluded_labels = ["build", "cli", "config", "core", "new-provider", "new-provisioner", "new-remote-state", "provider/terraform"] - aliases = { - "provider/google-cloud" = "provider/google" - "provider/influx" = "provider/influxdb" - "provider/vcloud" = "provider/vcd" - } - issue_header = <<-EOF - _This issue was originally opened by @${var.user} as ${var.repository}#${var.issue_number}. It was migrated here as a result of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._ - -
- - EOF - migrated_comment = "This issue has been automatically migrated to ${var.repository}#${var.issue_number} because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to ${var.repository}#${var.issue_number}." -} - -poll "closed_issue_locker" "locker" { - schedule = "0 50 1 * * *" - closed_for = "720h" # 30 days - no_comment_if_no_activity_for = "1440h" # 60 days - max_issues = 500 - sleep_between_issues = "5s" - - message = <<-EOF - I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues. - - If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. - EOF -}