hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

Migrate/Remove GitHub HashiBot Behaviors #19356

Closed bflad closed 3 years ago

bflad commented 3 years ago

Community Note

Description

GitHub HashiBot is being deprecated and decommissioned in preference of GitHub Actions. This issue to track behavior removals and migrations for this repository.

closed_issue_locker Migration

This behavior can be migrated to the dessant/lock-threads GitHub Action.

.github/workflows/lock.yml

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 issues.

            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'

deprecated_import_commenter Removal

This behavior was designed to add comments to pull requests containing certain Go imports. For example, when migrating Terraform Providers from Terraform Plugin SDK version 1 to 2, the entire existing codebase would be bulk updated, leaving existing (and for a short period new) pull request contributions in an invalid state for merging. Pull request open and next synchronize would trigger the comment once the behavior was in place.

Given this behavior is only enabled by the terraform-provider-aws repository today and there are no recent Go import deprecations, no replacement is provided. The behavior could be captured in a new GitHub Action, if desired and when necessary.

pull_request_path_labeler Migration

This behavior can be migrated to the actions/labeler GitHub Action.

.github/workflows/pull-request.yml

name: "Pull Request Triage"

on: [pull_request_target]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/labeler@v3
      with:
        configuration-path: .github/labeler-pull-request-triage.yml
        repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/labeler-pull-request-triage.yml

dependencies:
  - .github/dependabot.yml
documentation:
  - docs/**/*
  - website/**/*
  - *.md
examples:
  - examples/**/*
provider:
  - *.md
  - .github/**/*
  - .gitignore
  - .go-version
  - aws/auth_helpers.go
  - aws/awserr.go
  - aws/config.go
  - aws/*_aws_arn*
  - aws/*_aws_ip_ranges*
  - aws/*_aws_partition*
  - aws/*_aws_region*
  - aws/internal/flatmap/**/*
  - aws/internal/keyvaluetags/**/*
  - aws/internal/naming/**/*
  - aws/provider.go
  - aws/utils.go
  - docs/*.md
  - docs/contributing/**/*
  - GNUmakefile
  - infrastructure/**/*
  - main.go
  - website/docs/index.html.markdown
  - website/**/arn*
  - website/**/ip_ranges*
  - website/**/partition*
  - website/**/region*
service/accessanalyzer:
  - aws/internal/service/accessanalyzer/**/*
  - **/*_accessanalyzer_*
  - **/accessanalyzer_*
service/acm:
  - aws/internal/service/acm/**/*
  - **/*_acm_*
  - **/acm_*
# ... many more services ...
tests:
  - **/*_test.go
  - **/testdata/**/*
  - .github/workflows/*
  - .golangci.yml
  - .markdownlinkcheck.json
  - .markdownlint.yml
  - staticcheck.conf

pull_request_size_labeler Migration

This behavior can be migrated to the codelytv/pr-size-labeler GitHub Action.

.github/workflows/pull-request-size.yml

name: "Pull Request Size Labeler"

on: [pull_request]

jobs:
  labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: codelytv/pr-size-labeler@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          xs_max_size: '30'
          s_max_size: '60'
          m_max_size: '150'
          l_max_size: '300'

regexp_issue_labeler_v2 Migration

This behavior can be migrated to the actions/issue-labeler GitHub Action. The issue labeling workflow is already present in .github/workflows/issues.yml, it just needs the label configuration migrated.

.github/labeler-issue-triage.yml

bug:
  # General:
  #   panic:
  # AWS SDK Go:
  #   ValidationException:.*failed to satisfy constraint: Member must not be null
  # Terraform CLI:
  #   Provider produced inconsistent final plan
  #   Provider produced inconsistent result after apply
  #   produced an invalid new value
  #   produced an unexpected new value
  # Terraform Plugin SDK:
  #   doesn't support update
  #   Invalid address to set
  - "(doesn't support update|failed to satisfy constraint: Member must not be null|Invalid address to set|panic:|produced an (invalid|unexpected) new value|Provider produced inconsistent (final plan|result after apply))"
crash:
  - 'panic:'
service/accessanalyzer:
  - '((\*|-) ?`?)?(data "?|resource "?)aws_accessanalyzer_'
service/acm:
  - '((\*|-) ?`?)?(data "?|resource "?)aws_acm_'
# ... many more services ...

release_commenter Migration

TBD

remove_labels_on_reply Migration

This behavior can be migrated to the actions-ecosystem/action-remove-labels GitHub Action.

.github/workflows/issue-comment-created.yml

name: Issue Comment Created Triage

on:
  issue_comment:
    types: [created]

jobs:
  issue_comment_triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2 
      - uses: actions-ecosystem/action-remove-labels@v1
        with:
          labels: |
            stale
            waiting-reply
github-actions[bot] commented 3 years ago

This functionality has been released in v3.45.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 3 years ago

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.