Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvictor committed Nov 5, 2024
1 parent b72249f commit 03b4314
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/dashboards-issue-add-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,15 @@ jobs:
with:
# Secrets placed in the ci/repo/grafana/<repo>/<path> path in Vault
repo_secrets: |
APP_ID=triager_bot_github:app_id
APP_PEM=triager_bot_github:app_pem
GH_APP_ID=plugins_platform_issue_commands_github_bot:app_id
GH_APP_PEM=plugins_platform_issue_commands_github_bot:app_pem
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ env.APP_PEM }}
- name: Check org membership
id: check_membership
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
RESPONSE=$(gh api graphql -f query='
query($login: String!) {
user(login: $login) {
organization(login: "grafana") {
id
}
}
}
' -f login="mdvictor")
echo "RESPONSE: $RESPONSE"
# Use select to safely navigate the response
if echo "$RESPONSE" | jq -e '.data.user?.organization?.id != null' > /dev/null; then
echo "is_member=true" >> "$GITHUB_OUTPUT"
else
echo "is_member=false" >> "$GITHUB_OUTPUT"
fi
- name: Check if issue is in target project
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
Expand Down

0 comments on commit 03b4314

Please # to comment.