-
Notifications
You must be signed in to change notification settings - Fork 0
ROX-32966: Add disabling label for the konflux retests #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kurlov
wants to merge
7
commits into
main
Choose a base branch
from
akurlov/ROX-32966-add-disabling-label
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
18c1f78
Add disabling label for the konflux retests
kurlov 14c6ca4
Merge branch 'main' into akurlov/ROX-32966-add-disabling-label
kurlov 5e51585
Change the implementation to reading actual labels before posting retest
kurlov c66a250
Change null check
kurlov 1da5363
Update .github/workflows/retest-konflux-builds.yml
kurlov 3881168
Add quoting around command
kurlov 0b16f1b
Review comments
kurlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ jobs: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| RETEST_COMMAND: ${{ inputs.retest_command }} | ||
| run: | | ||
| set -euo pipefail | ||
| PR_NUMBER="${{ github.event.pull_request.number }}" | ||
|
|
||
| echo "New commit pushed to PR #$PR_NUMBER. Cleaning up existing $RETEST_COMMAND comments from GitHub Actions..." | ||
|
|
@@ -62,7 +63,7 @@ jobs: | |
| auto-retest-failed-konflux-build: | ||
| if: | | ||
| github.event_name == 'check_run' && | ||
| github.event.check_run.pull_requests[0] != null && | ||
| github.event.check_run.pull_requests.length > 0 && | ||
| github.event.check_run.conclusion == 'failure' && | ||
| startsWith(github.event.check_run.name, 'Red Hat Konflux') | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -81,7 +82,16 @@ jobs: | |
| CHECK_NAME_SUFFIX: ${{ inputs.check_name_suffix }} | ||
| RETEST_COMMAND: ${{ inputs.retest_command }} | ||
| run: | | ||
| set -euo pipefail | ||
| CHECK_NAME="${{ github.event.check_run.name }}" | ||
| PR_NUMBER="${{ github.event.check_run.pull_requests[0].number }}" | ||
|
|
||
| # Fetch current PR labels to avoid race conditions with stale event data | ||
| CURRENT_LABELS="$(gh pr view "$PR_NUMBER" --repo ${{ github.repository }} --json labels --jq '.labels[].name')" | ||
| if echo "$CURRENT_LABELS" | grep -q "^disable-konflux-auto-retest$"; then | ||
| echo "Skipping retest: disable-konflux-auto-retest label is present" | ||
| exit 0 | ||
| fi | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like a new implementation that you landed 20 hours ago (according to GitHub). When I look at last comments/updates in https://github.com/stackrox/test-gh-actions/pull/240, they are from 2 days ago (according to GitHub). Would you like to test the change? |
||
|
|
||
| # Check if the check name ends with the configured suffix | ||
| if [[ ! "$CHECK_NAME" == *"$CHECK_NAME_SUFFIX" ]]; then | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.