Skip to content

Commit

Permalink
fix(worfklow): AGAIN! update dynamic env (#4405)
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore authored Dec 12, 2024
1 parent b4abd88 commit 07d56c0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
issue_comment:
types: [created]
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
OWNER: ${{ github.repository_owner }}

PROJECT_NUMBER: 39
Expand All @@ -27,19 +26,17 @@ jobs:
- name: Get issue ID
id: get_issue_id
run: |
ISSUE_ID=$(gh project item-list $PROJECT_NUMBER --owner=$OWNER --limit=$ITEM_FETCH_LIMIT --format=json --jq '.items[] | select(.content.number == $ISSUE_NUMBER and .content.repository == "carbon-design-system/carbon-website") | .id')
if [ -z "$ISSUE_ID" ]; then
echo "Issue ID not found for issue number $ISSUE_NUMBER"
exit 1
fi
echo "Issue ID is $ISSUE_ID"
echo "issue_id=$ISSUE_ID" >> "$GITHUB_OUTPUT"
ISSUE_ID=$(gh project item-list $PROJECT_NUMBER --owner=$OWNER --limit=$ITEM_FETCH_LIMIT --format=json --jq '.items[] | select(.content.number == '"${{ github.event.issue.number }}"' and .content.repository == "carbon-design-system/carbon-website") | .id')
if [ -z "$ISSUE_ID" ]; then
echo "Issue ID not found for issue number ${{ github.event.issue.number }}"
exit 1
fi
echo "Issue ID is $ISSUE_ID"
echo "issue_id=$ISSUE_ID" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
- name: Update issue with website area field
run:
gh project item-edit --project-id $PROJECT_ID --id $ISSUE_ID
--field-id $AREA_FIELD_ID --single-select-option-id $AREA_WEBSITE
run: |
gh project item-edit --project-id $PROJECT_ID --id ${{ steps.get_issue_id.outputs.issue_id }} --field-id $AREA_FIELD_ID --single-select-option-id $AREA_WEBSITE
env:
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
$ISSUE_ID: ${{ steps.get_issue_id.outputs.issue_id }}

0 comments on commit 07d56c0

Please sign in to comment.