Skip to content

Conversation

igorpecovnik
Copy link
Member

Enhanced the script to skip bump and revert pull requests in addition to bots and worker accounts.

Enhanced the script to skip bump and revert pull requests in addition to bots and worker accounts.
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

The 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)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the primary change by indicating that the pull request updates the PR filtering logic within the release logs workflow, which matches the addition of bump and revert filters described in the changeset. It is clear, concise, and directly reflects the main purpose of the update without unnecessary detail.
Description Check ✅ Passed The description accurately reflects the changes by stating that the script was enhanced to skip bump and revert pull requests in addition to existing bot and worker filters, directly matching the modifications in the workflow file. It is clearly related to the changeset and conveys the core intent of the update.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch igorpecovnik-patch-4

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 8dadbd5 and 2ccd26c.

📒 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

Comment on lines +128 to +136
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
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant