Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 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,6 +16,25 @@ 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: Exit if author is team member
if: steps.comment.outputs.isTeamMember == 'true'
run: exit 0
neuronull marked this conversation as resolved.
Show resolved Hide resolved

- name: Move issue back to Triage if status is Blocked/Waiting
env:
GH_TOKEN: ${{ secrets.GH_PROJECT_PAT }}
Expand Down
Loading