Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 8, 2024
1 parent cd7ce94 commit b0a5cfb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/reopen-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
issues: write
contents: read

env:
ISSUE_NUMBERS: ""

steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -35,19 +38,20 @@ jobs:
- name: Set issue numbers
run: |
echo "ISSUE_NUMBERS=${{ steps.fetch_issues.outputs.issue_numbers }}" >> $GITHUB_ENV
echo "Issue numbers: ${{ steps.fetch_issues.outputs.issue_numbers }}"
echo "Fetched Issue Numbers: ${{ steps.fetch_issues.outputs.issue_numbers }}"
- name: Check if issue numbers are empty
id: check_empty
run: |
if [ -z "${{ steps.fetch_issues.outputs.issue_numbers }}" ]; then
if [ -z "${ISSUE_NUMBERS}" ]; then
echo "No issues found with the 'lifecycle/stale' label. Exiting."
exit 0
fi
echo "Issue Numbers are not empty, proceeding."
continue-on-error: true

- name: Reopen Issues
uses: actions/github-script@v7
env:
ISSUE_NUMBERS: ${{ steps.fetch_issues.outputs.issue_numbers }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -67,8 +71,6 @@ jobs:
- name: Remove lifecycle/stale Label
uses: actions/github-script@v7
env:
ISSUE_NUMBERS: ${{ steps.fetch_issues.outputs.issue_numbers }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down

0 comments on commit b0a5cfb

Please sign in to comment.