Skip to content

CI: Allow the GitHub Actions bot to commit to release branches#34076

Open
Sidnioulz wants to merge 2 commits intonextfrom
sidnioulz/danger-script-github-bot
Open

CI: Allow the GitHub Actions bot to commit to release branches#34076
Sidnioulz wants to merge 2 commits intonextfrom
sidnioulz/danger-script-github-bot

Conversation

@Sidnioulz
Copy link
Member

@Sidnioulz Sidnioulz commented Mar 9, 2026

What I did

Allowed GitHub Actions Bot to bypass the PR branch check.

Checklist for Contributors

Testing

ø

Manual testing

ø (needs to be merged to test it)

Summary by CodeRabbit

  • Chores
    • Updated pull request validation to allow automated bot-generated pull requests (e.g., GitHub Actions) to bypass branch-target checks.
    • Extended skip conditions to include bot authors alongside existing owner/member exemptions.
    • No changes to public/exported signatures or external behavior.

@Sidnioulz Sidnioulz requested a review from yannbf March 9, 2026 12:34
@Sidnioulz Sidnioulz added build Internal-facing build tooling & test updates ci:normal labels Mar 9, 2026
@nx-cloud
Copy link

nx-cloud bot commented Mar 9, 2026

View your CI Pipeline Execution ↗ for commit 2530244

Command Status Duration Result
nx run-many -t compile -c production --parallel=1 ✅ Succeeded 5m 42s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-09 13:43:00 UTC

@nx-cloud
Copy link

nx-cloud bot commented Mar 9, 2026

View your CI Pipeline Execution ↗ for commit 8c7472f


☁️ Nx Cloud last updated this comment at 2026-03-09 12:35:10 UTC

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 910cdbe9-4be6-4bb7-935f-5c2d28deba27

📥 Commits

Reviewing files that changed from the base of the PR and between 8c7472f and 2530244.

📒 Files selected for processing (1)
  • scripts/dangerfile.js

📝 Walkthrough

Walkthrough

Extends the skip condition in checkTargetBranch within the Danger script so pull requests authored by the GitHub Actions bot (github-actions[bot] / type Bot) bypass target-branch validation, alongside existing OWNER and MEMBER exemptions.

Changes

Cohort / File(s) Summary
Branch validation bot exemption
scripts/dangerfile.js
Adds a local author variable and extends the skip condition to also bypass target-branch checks when the PR author is the GitHub Actions bot (author.login === 'github-actions[bot]' && author.type === 'Bot').

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/dangerfile.js`:
- Around line 150-157: The code incorrectly reads danger.github.pr.author into
the variable author causing undefined for contributor PRs; update the assignment
to use danger.github.pr.user instead and ensure subsequent checks that reference
author (and authorAssociation) still work (the conditional that checks
['OWNER','MEMBER'].includes(authorAssociation) and the bot check that uses
author.login and author.type should operate on the new author variable). Locate
the author/authorAssociation initialization and replace the source for author
from pr.author to pr.user so the bot/type access no longer throws a TypeError.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1e979b3-df2b-4cae-9806-6dc9d392707f

📥 Commits

Reviewing files that changed from the base of the PR and between 0096e34 and 8c7472f.

📒 Files selected for processing (1)
  • scripts/dangerfile.js

@Sidnioulz Sidnioulz changed the title Allow the GitHub Actions bot to commit to release branches CI: Allow the GitHub Actions bot to commit to release branches Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants