Skip to content

Commit

Permalink
Merge pull request #1685 from michalvavrik/feature/fix-flaky-test-wor…
Browse files Browse the repository at this point in the history
…kflow-again-again

Fix Flaky workflow by getting PR from downloaded artifact instead of empty event object
  • Loading branch information
michalvavrik authored Feb 21, 2024
2 parents 5cd2630 + 8c44c2b commit 28053c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/add-flaky-test-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
WORKFLOW_ID: ${{ github.event.workflow_run.id }}
steps:
- name: 'Download "jobs-with-flaky-tests" artifact'
Expand All @@ -23,8 +22,8 @@ jobs:
- name: 'Add "triage/flaky-test" label'
if: ${{ hashFiles('**/pr-number') != '' }}
run: |
gh pr edit "$PR_NUMBER" --add-label 'triage/flaky-test'
gh pr edit "$(cat pr-number)" --add-label 'triage/flaky-test'
- name: 'Comment on PR about flaky tests'
if: ${{ hashFiles('**/pr-number') != '' }}
run: |
gh pr comment "$PR_NUMBER" --body "Following jobs contain at least one flaky test: $(cat jobs-with-flaky-tests)"
gh pr comment "$(cat pr-number)" --body "Following jobs contain at least one flaky test: $(cat jobs-with-flaky-tests)"

0 comments on commit 28053c5

Please sign in to comment.