Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ When a Konflux build check fails on a pull request, this action will automatical
- **Configurable Retry Limit**: Set maximum retry attempts to prevent infinite loops
- **Auto-Cleanup**: Removes old `/retest` comments when new commits are pushed
- **Filtered Checks**: Only retests checks matching a specific name suffix (e.g., `-on-push`)
- **Disable via Label**: Add the `disable-konflux-auto-retest` label to a PR to skip automatic retesting


### Usage
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/retest-konflux-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ on:

jobs:
cleanup-retest-comments:
if: github.event_name == 'pull_request'
if: |
github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'disable-konflux-auto-retest')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different event types and because of that a bit different label extraction

runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -58,7 +60,8 @@ jobs:
github.event_name == 'check_run' &&
github.event.check_run.pull_requests[0] != null &&
github.event.check_run.conclusion == 'failure' &&
startsWith(github.event.check_run.name, 'Red Hat Konflux')
startsWith(github.event.check_run.name, 'Red Hat Konflux') &&
!contains(github.event.check_run.pull_requests[0].labels.*.name, 'disable-konflux-auto-retest')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we know that there is a least one PR associated with the check (see check above). My understanding is that the Konflux check might have multiple PRs only when the same commit is used in those PRs. I assume it's quite rare and unique scenario so I believe [0] is correct instead of * (we don't want to disable if at least one PR has label)

runs-on: ubuntu-latest

permissions:
Expand Down
Loading