TT-16103: trigger release to suggested branch after merge#127
Conversation
|
This PR introduces an automation that triggers release workflows after a pull request is successfully merged. It extends the existing Files Changed Analysis
Architecture & Impact Assessment
graph TD
A[PR Merged] -->|Triggers `pull_request:closed`| B(branch-suggestion.yml Workflow)
subgraph B
C{Is PR Merged?} -- Yes --> D[analyze-and-suggest job]
C -- No --> E[Exit]
D -->|Saves results to disk| F["/tmp/results.json"]
D --> G[post-release-commands job]
G -->|Reads results from disk| F
G --> H[Run post-release-commands.js]
end
subgraph "Node.js Script"
H --> I{Filter for required/recommended branches}
I --> J[For each branch]
J --> K[Check for existing comment via API]
K -- Not found --> L[Post `/release to <branch>` comment]
K -- Found --> M[Skip]
end
L --> N((🚀 Downstream Release Workflow Triggered))
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2026-06-11T08:32:16.056Z | Triggered by: pr_updated | Commit: ee2525d 💡 TIP: You can chat with Visor using |
Security Issues (1)
Security Issues (1)
No architecture issues found – changes LGTM. Performance Issues (2)
Quality Issues (1)
Powered by Visor from Probelabs Last updated: 2026-06-11T08:31:31.948Z | Triggered by: pr_updated | Commit: ee2525d 💡 TIP: You can chat with Visor using |
988fc3c to
3089c6e
Compare
There was a problem hiding this comment.
The PR looks solid and correctly implements the automated release comments logic.
A few highlights:
- Idempotency: The use of
<!-- auto-release: <branch> -->markers ensures we don't post duplicate comments if the workflow is re-run. - Early Exits: Correctly skipping analysis when a PR is closed but not merged saves unnecessary API calls.
- Branch Filtering: Correctly filters out
masterand only targetsrequiredorrecommendedbranches.
Because this is a reusable workflow, updating the on.pull_request.types here to include closed is only half the puzzle.
For this to actually trigger when a PR is merged in the tyk repository, you will also need to update the caller workflow in the tyk repo (.github/workflows/intelligent-branch-recomendations.yml) to include the closed event type:
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- closed # <--- This must be added in the tyk repo!Great work on this!
2b10608 to
6b0bc76
Compare
rafalgolarz
left a comment
There was a problem hiding this comment.
After a call with @olamilekan000 and @konrad-sol we can merge it in to test it before the actual release.
43a611c to
02f7799
Compare
83909c6 to
f626b08
Compare
f626b08 to
ee2525d
Compare
There was a problem hiding this comment.
Approved. Please remember about pushing changes in separated commits 🥺 🙏
Please confirm with @ilijabojanovic it can be merged in, thank you.
Uh oh!
There was an error while loading. Please reload this page.