Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgrathTT committed Feb 13, 2025
1 parent b150d67 commit eb09522
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions .github/actions/add-last-updated/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ inputs:
description: "Github issue number used for testing"
required: true


runs:
using: "composite"
steps:
Expand All @@ -31,7 +30,6 @@ runs:
echo "Issue ID: ${issue_id}"
echo "issue_id=$issue_id" >> $GITHUB_ENV
- name: Get Item ID for Issue
shell: bash
id: get_item_id_by_issue_id
Expand All @@ -40,7 +38,6 @@ runs:
CURSOR=null
ITEM_ID=""
# Define the GraphQL query as a string
QUERY='query($projectId: ID!, $cursor: String) {
node(id: $projectId) {
Expand All @@ -63,7 +60,6 @@ runs:
}
}'
while : ; do
# Construct JSON payload using jq for proper formatting
JSON_PAYLOAD=$(jq -n \
Expand All @@ -83,15 +79,13 @@ runs:
# Debug: print entire response
echo "RESPONSE: $RESPONSE"
# Check if the response contains `items` data
ITEMS_DATA=$(echo "$RESPONSE" | jq -r '.data.node.items.nodes' 2>/dev/null)
if [[ "$ITEMS_DATA" == "null" ]]; then
echo "Error: Items data not found. Please check your PROJECT_ID and GITHUB_TOKEN permissions."
exit 1
fi
# Parse the item ID if it matches the issue_id
ITEM_ID=$(echo "$RESPONSE" | jq -r --arg issue_id "$issue_id" \
'.data.node.items.nodes[] | select(.content.id==$issue_id) | .id')
Expand All @@ -104,7 +98,6 @@ runs:
break
fi
# Extract pagination information
HAS_NEXT_PAGE=$(echo "$RESPONSE" | jq -r '.data.node.items.pageInfo.hasNextPage')
CURSOR=$(echo "$RESPONSE" | jq -r '.data.node.items.pageInfo.endCursor')
Expand Down Expand Up @@ -132,4 +125,4 @@ runs:
-H "Content-Type: application/json" \
-d "{ \"query\": \"mutation { updateProjectV2ItemFieldValue(input: { projectId: \\\"${{ inputs.project_id }}\\\", itemId: \\\"${{ env.ITEM_ID }}\\\", fieldId: \\\"${{ inputs.field_id }}\\\", value: { date: \\\"$current_date\\\" } }) { clientMutationId } }\" }" \
-X POST \
"https://api.github.com/graphql"
"https://api.github.com/graphql"

0 comments on commit eb09522

Please sign in to comment.