Skip to content

Commit

Permalink
fix: release checklist wokflow Correct for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmetNSimsek committed Feb 26, 2024
1 parent 77c7efa commit ae4066b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/release-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- sanitiy-check
if: success()
outputs:
OPEN_ISSUES: ${{ steps.get-all-issues.outputs.ALL_ISSUES }}
OPEN_RELEASE_ISSUES: ${{ steps.get-all-issues.outputs.ALL_ISSUES }}
steps:
- name: 'Getting all opened issue matching ${{ env.RELEASE_CHECKLIST_TAG }} in ${{ env.REPO }}'
id: 'get-all-issues'
Expand All @@ -48,10 +48,10 @@ jobs:
- get-all-opened
steps:
- run: |
OPEN_ISSUES=${{ needs.get-all-opened.outputs.OPEN_ISSUES }}
echo Found open issues: $OPEN_ISSUES
for issue in $(echo $OPEN_ISSUES | jq -c '.[]')
then
OPEN_RELEASE_ISSUES=${{ needs.get-all-opened.outputs.OPEN_RELEASE_ISSUES }}
echo Found open issues: $OPEN_RELEASE_ISSUES
for issue in $(echo $OPEN_RELEASE_ISSUES | jq -c '.[]')
do
url=$(echo $issue | jq -r '.url')
new_issue_body=$(echo $issue | jq -r '.body' | sed '1s/master/${{ env.TAG_NAME }}/')
Expand All @@ -62,18 +62,18 @@ jobs:
echo new_issue_body: $new_issue_body
echo -e $new_issue_body | gh issue edit "$url" -F -
fi
done
add-comment-existing:
runs-on: ubuntu-latest
needs:
- get-all-opened
steps:
- run: |
OPEN_ISSUES=${{ needs.get-all-opened.outputs.OPEN_ISSUES }}
echo Found open issues: $OPEN_ISSUES
for issue in $(echo $OPEN_ISSUES | jq -c '.[]')
then
OPEN_RELEASE_ISSUES=${{ needs.get-all-opened.outputs.OPEN_RELEASE_ISSUES }}
echo Found open issues: $OPEN_RELEASE_ISSUES
for issue in $(echo $OPEN_RELEASE_ISSUES | jq -c '.[]')
do
url=$(echo $issue | jq -r '.url')
echo $issue | jq -r '.body' | grep -Fq "<person name>"
Expand All @@ -88,7 +88,7 @@ jobs:
echo update issue $url
echo -e new_comment: \\n\\n bar $new_comment
echo -e $new_comment | gh issue comment $url -F -
fi
done
close-existing:
runs-on: ubuntu-latest
Expand All @@ -97,15 +97,15 @@ jobs:
steps:
- name: "Add comment to issue"
run: |
OPEN_ISSUES=${{ needs.get-all-opened.outputs.OPEN_ISSUES }}
echo Found open issues: $OPEN_ISSUES
for issue in $(echo $OPEN_ISSUES | jq -c '.[]')
then
OPEN_RELEASE_ISSUES=${{ needs.get-all-opened.outputs.OPEN_RELEASE_ISSUES }}
echo Found open issues: $OPEN_RELEASE_ISSUES
for issue in $(echo $OPEN_RELEASE_ISSUES | jq -c '.[]')
do
id=$(echo $issue | jq -r '.id')
url=$(echo $issue | jq -r '.url')
gh issue close $url -r completed
fi
done
open-new:
runs-on: ubuntu-latest
Expand Down

0 comments on commit ae4066b

Please sign in to comment.