Skip to content

Commit

Permalink
Provide token (#161)
Browse files Browse the repository at this point in the history
Provide token
  • Loading branch information
srikrsna-buf authored Jan 25, 2024
1 parent 30a7e93 commit 3875c7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/add-to-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
- name: Get project id if status is done
if: ${{ github.event_name == 'issue_comment' }}
id: get_project_item_id
env:
GH_TOKEN: ${{ steps.app_token.outputs.token }}
run: |
echo item_id=$(gh api graphql -f query='query ($name: String!, $owner: String!, $number: Int!) {
repository(name: $name, owner: $owner) {
Expand All @@ -55,6 +57,8 @@ jobs:
}' -f name='${{ github.event.repository.name }}' -f owner='${{ github.event.repository.owner }}' -f number='${{ github.event.issue.number }}' | jq -r '.data.repository.issue.projectItems.nodes | .[] | select(.project.number==1 and .fieldValueByName.optionId == "dea0b2c9") | .id') >> $GITHUB_OUTPUT
- name: "Update status"
if: ${{ steps.get_project_item_id.outputs.item_id != '' }}
env:
GH_TOKEN: ${{ steps.app_token.outputs.token }}
run: |
gh api -f query='mutation ($itemId: String!) {
updateProjectV2ItemFieldValue(
Expand Down

0 comments on commit 3875c7d

Please sign in to comment.