chore: beautify the slack message for the sync to pg workflow message#37318
chore: beautify the slack message for the sync to pg workflow message#37318
Conversation
WalkthroughThe pull request modifies the GitHub workflow file Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
.github/workflows/sync-release-to-pg.yml (3)
62-64: Consider enhancing the Slack notification message format.While the message construction is cleaner now, it could be more informative for developers.
Consider this enhanced format:
- message="Merge conflict detected while merging release into pg branch. Conflicted commits:" - commit_url="$REPOSITORY_URL/commit/$CONFLICTING_COMMIT" - message+="$commit_url" + message="🚨 Merge Conflict Alert: release → pg branch" + message+="\n• Conflicting Commit: $REPOSITORY_URL/commit/$CONFLICTING_COMMIT" + message+="\n• Action Required: Manual resolution needed"
Line range hint
82-84: Fix the Slack token interpolation in curl command.The single quotes around the token prevent variable expansion.
Apply this fix:
curl -v https://slack.com/api/chat.postMessage \ - --header 'Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}' \ + --header "Authorization: Bearer ${{ secrets.SLACK_APPSMITH_ALERTS_TOKEN }}" \ --header 'Content-Type: application/json; charset=utf-8' \
Line range hint
1-85: Consider adding timeout to prevent workflow hanging.Long-running merge operations could potentially hang. Adding a timeout would ensure the workflow fails gracefully.
Add this at the job level:
merge-release-to-pg: runs-on: ubuntu-latest + timeout-minutes: 10
Summary by CodeRabbit
pgbranch based on conflict detection.