github.com/hashicorp/packer@v1.14.3/.github/workflows/issues-opened.yml (about)

     1  on:
     2    issues:
     3      types: [opened]
     4  
     5  permissions:
     6    contents: read
     7  
     8  jobs:
     9    issue_triage:
    10      name: Issue Opened Triage
    11      permissions:
    12        contents: read
    13        issues: write  # for github/issue-labeler to create or remove labels
    14      runs-on: ubuntu-latest
    15      steps:
    16      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
    17      - uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
    18        with:
    19          repo-token: "${{ secrets.GITHUB_TOKEN }}"
    20          configuration-path: .github/labeler-issue-triage.yml
    21          enable-versioned-regex: 0
    22    label-question:
    23      name: Redirect to discuss
    24      permissions:
    25        contents: read
    26        issues: write  # for actions/github-script to create comments and add labels
    27      if: contains(github.event.issue.labels.*.name, 'question')
    28      runs-on: ubuntu-latest
    29      steps:
    30        - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    31          with:
    32            script: |
    33              github.rest.issues.createComment({
    34                issue_number: context.issue.number,
    35                owner: context.repo.owner,
    36                repo: context.repo.repo,
    37                body: `
    38                  Hi 👋 thanks for reaching out.
    39  
    40                  For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility.
    41                  As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum.
    42                  We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response.
    43                  If no activity is taken on this question within 30 days it will be automatically closed.
    44  
    45                  If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.`
    46              })
    47  
    48        - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    49          with:
    50            script: |
    51              github.rest.issues.addLabels({
    52                issue_number: context.issue.number,
    53                owner: context.repo.owner,
    54                repo: context.repo.repo,
    55                labels: ['needs-reply']
    56              })
    57