Skip to content

chore: add help make target #1190

chore: add help make target

chore: add help make target #1190

Workflow file for this run

name: Label Automations
permissions:
contents: read
issues: write
pull-requests: write
on:
issues:
types:
- closed
- edited
- opened
issue_comment:
types:
- created
pull_request_target:
types:
- assigned
- closed
- edited
- opened
jobs:
repo_and_community:
name: Repository and Community Labels
runs-on: ubuntu-latest
env:
GH_CLI_SUBCOMMAND: ${{ (github.event.issue.pull_request || github.event.pull_request) && 'pr' || 'issue' }}
GH_TOKEN: ${{ github.token }}
ISSUE_URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}
LABELS: ${{ toJSON(github.event.issue.labels.*.name || github.event.pull_request.labels.*.name) }}
steps:
- name: Checkout Community Check
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
sparse-checkout: .github/actions/community_check
- name: "Community Check: Author"
id: author
if: github.event.action == 'opened'
uses: ./.github/actions/community_check
with:
user_login: ${{ github.event.issue.user.login || github.event.pull_request.user.login }}
maintainers: ${{ secrets.MAINTAINERS }}
core_contributors: ${{ secrets.CORE_CONTRIBUTORS }}
partners: ${{ secrets.PARTNERS }}
- name: Indicate That Triage is Required
if: |
steps.author.conclusion != 'skipped'
&& steps.author.outputs.maintainer != 'true'
run: |
gh $GH_CLI_SUBCOMMAND edit "$ISSUE_URL" --add-label needs-triage
- name: Credit Core Contributor Contributions
if: |
github.event_name == 'pull_request_target'
&& steps.author.conclusion != 'skipped'
&& steps.author.outputs.core_contributor == 'true'
run: |
gh pr edit "$ISSUE_URL" --add-label external-maintainer
- name: Add prioritized to Maintainer Contributions
if: |
github.event_name == 'pull_request_target'
&& steps.author.conclusion != 'skipped'
&& steps.author.outputs.maintainer == 'true'
run: |
gh pr edit "$ISSUE_URL" --add-label prioritized
- name: Credit Partner Contributions
if: |
github.event_name == 'pull_request_target'
&& steps.author.conclusion != 'skipped'
&& steps.author.outputs.partner == 'true'
run: |
gh pr edit "$ISSUE_URL" --add-label partner
- name: "Community Check: Assignee"
id: assignee
if: github.event.action == 'assigned'
uses: ./.github/actions/community_check
with:
user_login: ${{ github.event.assignee.login }}
maintainers: ${{ secrets.MAINTAINERS }}
- name: Add prioritized to Maintainer Assignments
if: |
steps.assignee.conclusion != 'skipped'
&& steps.assignee.outputs.maintainer == 'true'
run: |
gh $GH_CLI_SUBCOMMAND edit "$ISSUE_URL" --add-label prioritized
- name: "Community Check: Editor"
id: editor
if: github.event.action == 'edited'
uses: ./.github/actions/community_check
with:
user_login: ${{ github.event.sender.login }}
maintainers: ${{ secrets.MAINTAINERS }}
- name: Remove Stale Indicators on Non-Maintainer Edit
if: |
(steps.editor.conclusion != 'skipped' && steps.editor.outputs.maintainer != 'true')
&& (contains(fromJSON(env.LABELS), 'stale') || contains(fromJSON(env.LABELS), 'waiting-response'))
run: |
gh $GH_CLI_SUBCOMMAND edit "$ISSUE_URL" --remove-label stale,waiting-response
- name: "Community Check: Commenter"
id: commenter
if: github.event.action == 'created'
uses: ./.github/actions/community_check
with:
user_login: ${{ github.event.comment.user.login }}
maintainers: ${{ secrets.MAINTAINERS }}
- name: Remove Stale Indicators on Non-Maintainer Comment
if: |
(steps.commenter.conclusion != 'skipped' && steps.commenter.outputs.maintainer != 'true')
&& (contains(fromJSON(env.LABELS), 'stale') || contains(fromJSON(env.LABELS), 'waiting-response'))
run: |
gh $GH_CLI_SUBCOMMAND edit "$ISSUE_URL" --remove-label stale,waiting-response
- name: Remove Triage Labels on Closure
if: |
github.event.action == 'closed'
&& (contains(fromJSON(env.LABELS), 'needs-triage') || contains(fromJSON(env.LABELS), 'waiting-response'))
run: |
gh $GH_CLI_SUBCOMMAND edit "$ISSUE_URL" --remove-label needs-triage,waiting-response