Skip to content

Commit

Permalink
chore(ci): filter team members from gardener issue comment workflow (#…
Browse files Browse the repository at this point in the history
…18915)

* chore(ci): filter team members from gardener issue comment workflow

* fix logic
  • Loading branch information
neuronull authored Oct 24, 2023
1 parent 26f430c commit bf56ac5
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/gardener_issue_comment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Gardener Issue Comment
#
# This workflow moves GH issues from the Gardener board's "Blocked / Waiting" column
# to the "Triage", so that the Gardener can assess the issue in light of new information.
# to "Triage", when a comment is posted on an issue from a non-team member
# so that the Gardener can assess the issue in light of new information.

name: Gardener Issue Comment

Expand All @@ -15,7 +16,23 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.event.issue.url, 'issues')
steps:
- name: Generate authentication token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.GH_APP_DATADOG_VECTOR_CI_APP_ID }}
private_key: ${{ secrets.GH_APP_DATADOG_VECTOR_CI_APP_PRIVATE_KEY }}

- name: Get PR comment author
id: comment
uses: tspascoal/get-user-teams-membership@v3
with:
username: ${{ github.actor }}
team: 'Vector'
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}

- name: Move issue back to Triage if status is Blocked/Waiting
if: steps.comment.outputs.isTeamMember == 'false'
env:
GH_TOKEN: ${{ secrets.GH_PROJECT_PAT }}
run: |
Expand Down

0 comments on commit bf56ac5

Please sign in to comment.