diff --git a/.github/workflows/issue_closed.yml b/.github/workflows/issue_closed.yml index 14f4a8afd..72dc80a58 100644 --- a/.github/workflows/issue_closed.yml +++ b/.github/workflows/issue_closed.yml @@ -10,7 +10,7 @@ permissions: jobs: cleanup-labels: runs-on: ubuntu-latest - if: ${{ (contains(github.event.issue.labels.*.name, 'pending-response') || contains(github.event.issue.labels.*.name, 'closing soon') || contains(github.event.issue.labels.*.name, 'pending-release')|| contains(github.event.issue.labels.*.name, 'pending-triage')) }} + if: ${{ (contains(github.event.issue.labels.*.name, 'pending-community-response') || (contains(github.event.issue.labels.*.name, 'pending-maintainer-response') || contains(github.event.issue.labels.*.name, 'closing soon') || contains(github.event.issue.labels.*.name, 'pending-release')|| contains(github.event.issue.labels.*.name, 'pending-triage')) }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 - name: remove unnecessary labels after closing @@ -19,7 +19,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE_NUMBER: ${{ github.event.issue.number }} run: | - gh issue edit $ISSUE_NUMBER --remove-label "closing soon" --remove-label "pending-response" --remove-label "pending-release" --remove-label "pending-triage" + gh issue edit $ISSUE_NUMBER --remove-label "closing soon" --remove-label "pending-community-response" --remove-label "pending-maintainer-response" --remove-label "pending-release" --remove-label "pending-triage" comment-visibility-warning: runs-on: ubuntu-latest diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 4c0192156..5562ecb8d 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -19,17 +19,27 @@ jobs: shell: bash run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' - remove-pending-response-label: + adjust-labels: runs-on: ubuntu-latest permissions: issues: write - if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending-response') }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 - - name: remove unnecessary labels after closing + - name: remove pending-community-response when new comment received + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && !github.event.issue.pull_request }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --remove-label "pending-community-response" + - name: add pending-maintainer-response when new community comment received + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --add-label "pending-maintainer-response" + - name: remove pending-maintainer-response when new owner/member comment received + if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_NUMBER: ${{ github.event.issue.number }} run: | - gh issue edit $ISSUE_NUMBER --remove-label "pending-response" + gh issue edit $ISSUE_NUMBER --remove-label "pending-maintainer-response" + diff --git a/.github/workflows/issue_labeled.yml b/.github/workflows/issue_labeled.yml index 74cac3182..cdf065716 100644 --- a/.github/workflows/issue_labeled.yml +++ b/.github/workflows/issue_labeled.yml @@ -6,7 +6,7 @@ on: jobs: remove-pending-triage-label: runs-on: ubuntu-latest - if: ${{ contains(fromJSON('["question", "bug", "feature-request", "improvement"]'), github.event.label.name) }} + if: ${{ contains(fromJSON('["question", "bug", "feature-request"]'), github.event.label.name) }} permissions: issues: write steps: diff --git a/.github/workflows/issue_opened.yml b/.github/workflows/issue_opened.yml index b3ccf5736..9dc25e7eb 100644 --- a/.github/workflows/issue_opened.yml +++ b/.github/workflows/issue_opened.yml @@ -18,19 +18,25 @@ jobs: shell: bash run: echo $ISSUE | sed 's/[^a-zA-Z0-9 &().,:]//g' | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"{}", "issueUrl":"'$ISSUE_URL'", "user":"'$USER'"}' - add-pending-triage-label: + add-issue-opened-labels: runs-on: ubuntu-latest permissions: issues: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + REPOSITORY_NAME: ${{ github.event.repository.full_name }} steps: - name: Add the pending-triage label shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_NUMBER: ${{ github.event.issue.number }} - REPOSITORY_NAME: ${{ github.event.repository.full_name }} run: | gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-triage" + - name: Add the pending-maintainer-response label + if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.issue.author_association) }} + shell: bash + run: | + gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" + maintainer-opened: runs-on: ubuntu-latest diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a09d5b3c2..4cd090ce2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -21,4 +21,4 @@ jobs: # PRs wont go stale days-before-pr-stale: -1 # Issues with any of these labels are checked. - any-of-labels: "pending-response, closing soon" + any-of-labels: "pending-community-response, closing soon"