File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,23 @@ jobs:
3131 id : check_file
3232 run : |
3333 if [ -s lychee/out.md ]; then
34- echo "has_issues=true" >> $GITHUB_OUTPUT
34+ echo "has_issues=true" >> $GITHUB_ENV
3535 else
36- echo "has_issues=false" >> $GITHUB_OUTPUT
36+ echo "has_issues=false" >> $GITHUB_ENV
3737 fi
38-
38+
3939 - name : Create or update GitHub Issue
40- if : steps.check_file.outputs .has_issues == 'true'
40+ if : env .has_issues == 'true'
4141 env :
4242 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4343 run : |
4444 ISSUE_TITLE="🚨 Broken Links Detected"
4545 ISSUE_BODY="$(cat lychee/out.md)"
46- EXISTING_ISSUE=$(gh issue list --state open --search "$ISSUE_TITLE" --json number,title | jq -r '.[] | select(.title == "'"$ISSUE_TITLE"'") | .number')
47-
46+ echo "Searching for existing issue..."
47+ gh issue list --state open --search "$ISSUE_TITLE" --json number,title > issues.json
48+ cat issues.json
49+ EXISTING_ISSUE=$(jq -r '.[] | select(.title == "'"$ISSUE_TITLE"'") | .number' issues.json)
50+
4851 if [ -n "$EXISTING_ISSUE" ]; then
4952 echo "Updating existing issue # $EXISTING_ISSUE"
5053 gh issue edit "$EXISTING_ISSUE" --body "$ISSUE_BODY"
You can’t perform that action at this time.
0 commit comments