Skip to content

Commit

Permalink
bugfix: Correct environment variable usage and syntax in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagosayshey committed Jun 27, 2024
1 parent 22602f2 commit 7badb36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/new-branch-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
PROJECT_ID: "PVT_kwDOCjbMFM4AjuUh"
run: |
echo "Fetching project item ID for issue number: $ISSUE_NUMBER"
QUERY='query fetchProjectItem($project:ID!, $number:Int!) {
QUERY='
query fetchProjectItem($project: ID!) {
node(id: $project) {
... on ProjectV2 {
items(first: 100) {
Expand All @@ -39,7 +40,7 @@ jobs:
}
}
}'
item_id=$(gh api graphql -f query="$QUERY" -f project=$PROJECT_ID -f number=$ISSUE_NUMBER --jq '.data.node.items.nodes[] | select(.content.number == '"$ISSUE_NUMBER"') | .id')
item_id=$(gh api graphql -f query="$QUERY" -f project=$PROJECT_ID --jq '.data.node.items.nodes[] | select(.content.number == '"$ISSUE_NUMBER"') | .id')
if [ -z "$item_id" ]; then
echo "Error: Project item ID not found for issue number $ISSUE_NUMBER"
exit 1
Expand All @@ -55,7 +56,7 @@ jobs:
run: |
echo "Setting status for Project Item ID: ${PROJECT_ITEM_ID}"
result=$(gh api graphql -f query='
mutation($project:ID!, $item:ID!, $fieldId:ID!, $value:String!) {
mutation($project: ID!, $item: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
Expand Down

0 comments on commit 7badb36

Please sign in to comment.