ci: do conditional in blocked/need-repro workflows at job level (#38186)

This commit is contained in:
David Sanders 2023-05-08 01:07:04 -07:00 committed by GitHub
parent 88710612a3
commit 3a7cfe300a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -10,12 +10,13 @@ permissions:
jobs:
issue-commented:
name: Remove blocked/need-repro on comment
if: ${{ contains(github.event.issue.labels.*.name, 'blocked/need-repro') && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Remove blocked/need-repro on comment
if: ${{ contains(github.event.issue.labels.*.name, 'blocked/need-repro') && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
- name: Remove label
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}

View file

@ -9,12 +9,13 @@ permissions: # added using https://github.com/step-security/secure-workflows
jobs:
issue-labeled:
name: blocked/need-repro label added
if: github.event.label.name == 'blocked/need-repro'
permissions:
issues: write # for actions-cool/issues-helper to update issues
runs-on: ubuntu-latest
steps:
- name: blocked/need-repro label added
if: github.event.label.name == 'blocked/need-repro'
- name: Create comment
uses: actions-cool/issues-helper@dad28fdb88da5f082c04659b7373d85790f9b135 # v3.3.0
with:
actions: 'create-comment'