mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-04-05 18:52:41 +00:00
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com> Co-authored-by: Pepe Fagoaga <pepe@prowler.com>
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: 'Tools: Comment Label Update'
|
|
|
|
on:
|
|
issue_comment:
|
|
types:
|
|
- 'created'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.issue.number }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
update-labels:
|
|
if: contains(github.event.issue.labels.*.name, 'status/awaiting-response')
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Remove 'status/awaiting-response' label
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: |
|
|
echo "Removing 'status/awaiting-response' label from #$ISSUE_NUMBER"
|
|
gh api /repos/${{ github.repository }}/issues/$ISSUE_NUMBER/labels/status%2Fawaiting-response \
|
|
-X DELETE
|
|
|
|
- name: Add 'status/waiting-for-revision' label
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: |
|
|
echo "Adding 'status/waiting-for-revision' label to #$ISSUE_NUMBER"
|
|
gh api /repos/${{ github.repository }}/issues/$ISSUE_NUMBER/labels \
|
|
-X POST \
|
|
-f labels[]='status/waiting-for-revision'
|