Skip to content

Enhance Slack notification for PRs by including the base branch in th… - #2511

Merged
anunay-xin merged 1 commit into
mainfrom
pr-notify-base-branch
Aug 11, 2026
Merged

Enhance Slack notification for PRs by including the base branch in th…#2511
anunay-xin merged 1 commit into
mainfrom
pr-notify-base-branch

Conversation

@anunay-xin

@anunay-xin anunay-xin commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

…e message body

Proposed changes

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Changes that don't change source code or tests
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: Revert something
  • style: Changes that do not affect the meaning of the code
  • test: Adding missing tests or correcting existing tests

Impacted Components

Which parts of the codebase does this PR touch?
Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Tested on a private network from the genesis block and monitored the chain operating correctly for multiple epochs.
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

Summary by CodeRabbit

  • Enhancements
    • Pull request Slack notifications now display the target branch using inline code formatting.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Slack PR notification workflow now captures the pull request base branch and includes it as inline code after the author. Webhook posting remains unchanged.

Changes

Slack PR notification

Layer / File(s) Summary
Add base branch to notification
.github/workflows/pr-notify-slack.yml
The notification script captures the pull request base branch and adds it to the Slack message after the author.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description identifies the CI change but leaves the proposed changes, impacted components, and checklist incomplete. Add a concise change summary, select the impacted component, and complete the checklist or explain why items do not apply.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding the base branch to Slack pull request notifications.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-notify-base-branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-notify-slack.yml:
- Line 56: Update the workflow step containing PR_BASE and related pull-request
assignments to pass github.event.pull_request.* values through the step-level
env block, then read each value from quoted shell variables in the script.
Remove direct GitHub expression interpolation from generated Bash while
preserving the existing jq inputs and behavior.
- Around line 56-65: Add a workflow-level permissions block with no granted
permissions to the pull_request_target workflow, preserving the existing Slack
notification job and its PR metadata usage. Use the workflow’s top-level
configuration rather than modifying the curl or conditional execution logic.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3bc7b8fb-7598-4824-a88c-03959d821630

📥 Commits

Reviewing files that changed from the base of the PR and between e507c3b and 5453e14.

📒 Files selected for processing (1)
  • .github/workflows/pr-notify-slack.yml

Comment thread .github/workflows/pr-notify-slack.yml
Comment thread .github/workflows/pr-notify-slack.yml
@anunay-xin
anunay-xin merged commit 2d30685 into main Aug 11, 2026
31 checks passed
@anunay-xin
anunay-xin deleted the pr-notify-base-branch branch August 11, 2026 12:20
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.

4 participants