From d40350b7928d1848b59c47c7958f902fd44e2967 Mon Sep 17 00:00:00 2001 From: "Andrea N. Cardona" Date: Tue, 29 Aug 2023 08:20:14 -0700 Subject: [PATCH] feat: 14294-testing-github-bot-labels (#14536) --- .github/workflows/contribution-approved.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/contribution-approved.yml b/.github/workflows/contribution-approved.yml index 80cafdcead4c..ab86aee3eb18 100644 --- a/.github/workflows/contribution-approved.yml +++ b/.github/workflows/contribution-approved.yml @@ -6,21 +6,24 @@ # GitHub recommends pinning actions to a commit SHA. # To get a newer version, you will need to update the SHA. # You can also reference a tag or branch, but the action may change without warning -name: Add comment on Enhancement Label +name: Add comment on enhancement issue on: issues: - types: - - labeled + types: [labeled, opened] + +permissions: + issues: write + jobs: add-comment: - ## TODO: figure out how to escape colons for labels - # if: github.event.label.name == "proposal: accepted" && github.event.label.name == "community contribution" - if: "${{ contains(github.event.label.*.name, format('proposal{0} accepted', ':')) && contains(github.event.label.*.name, format('communit contribution'))}}" + name: Add comment to with proposal accepted and community contribution runs-on: ubuntu-latest - permissions: - issues: write steps: - name: Add comment + if: + ${{ contains(github.event.issue.labels.*.name, + format('proposal{0} accepted', ':')) || + contains(github.event.issue.labels.*.name, format('community contribution'))}} uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6.4.1 with: script: |