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 747a266 commit 7a06163
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/dashboards-issue-add-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,29 @@ jobs:
with:
app_id: ${{ env.APP_ID }}
private_key: ${{ env.APP_PEM }}
- name: log in
- name: Check org membership
id: check_membership
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: gh api user -q .login
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
run: |
gh api graphql -f query='
Expand Down

0 comments on commit 7a06163

Please # to comment.