-
-
Notifications
You must be signed in to change notification settings - Fork 6
Update PR filtering logic in release logs workflow #75
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
base: main
Are you sure you want to change the base?
Conversation
Enhanced the script to skip bump and revert pull requests in addition to bots and worker accounts.
WalkthroughThe workflow .github/workflows/generate-release-logs.yml was updated to extend PR filtering. It now computes a lowercase version of the PR title (title_lc) and skips PRs whose titles begin with bump or revert (including variations). Existing author-based skips for bots/workers remain. The workflow continues to emit tab-separated fields (title, author, repo, pr_number, pr_url) and preserves the existing sorting behavior. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Single-file change with straightforward conditional logic additions, low heterogeneity, and no interface changes. The review focuses on verifying title normalization, prefix checks, and that existing outputs and sorting are unaffected. Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/generate-release-logs.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Get from Armbian Repository
title_lc="$(echo "$title" | tr '[:upper:]' '[:lower:]')" | ||
if [[ "$author" == "github-actions[bot]" || \ | ||
"$author" == "dependabot[bot]" || \ | ||
"$author" == "armbianworker" || \ | ||
"$author" == "armbianworker[bot]" || \ | ||
"$title_lc" == bump* || \ | ||
"$title_lc" == revert* || \ | ||
"$title_lc" =~ "bump "* || \ | ||
"$title_lc" =~ "revert "* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the bump/revert matcher.
The new =~ "bump "*
/ =~ "revert "*
checks never fire for titles like “feat: bump deps” because the regex becomes bump *
, which only matches bump followed by spaces. As a result, the workflow still includes the very PRs we meant to skip. Please tighten the condition, e.g.:
- if [[ "$author" == "github-actions[bot]" || \
- "$author" == "dependabot[bot]" || \
- "$author" == "armbianworker" || \
- "$author" == "armbianworker[bot]" || \
- "$title_lc" == bump* || \
- "$title_lc" == revert* || \
- "$title_lc" =~ "bump "* || \
- "$title_lc" =~ "revert "* ]]; then
+ if [[ "$author" == "github-actions[bot]" || \
+ "$author" == "dependabot[bot]" || \
+ "$author" == "armbianworker" || \
+ "$author" == "armbianworker[bot]" ]]; then
+ continue
+ fi
+
+ if [[ "$title_lc" =~ ^(bump|revert)\b || \
+ "$title_lc" =~ (^|[^[:alnum:]])(bump|revert)\b ]]; then
continue
fi
That reliably kills PRs whose titles start with—or contain a scoped prefix plus—“bump”/“revert”.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
.github/workflows/generate-release-logs.yml around lines 128-136: the =~ "bump
"* and =~ "revert "* tests produce incorrect regexes and miss titles like "feat:
bump deps"; replace those two conditions with regexes that match word boundaries
or non-alphanumeric separators (for example =~ '(^|[^[:alnum:]])bump' and =~
'(^|[^[:alnum:]])revert') so titles that start with or contain scoped prefixes
plus "bump"/"revert" are correctly detected and skipped.
Enhanced the script to skip bump and revert pull requests in addition to bots and worker accounts.