fix(ci): fix changelog link in the Github-bot#4739
fix(ci): fix changelog link in the Github-bot#4739vamshigovardhana wants to merge 7 commits intowebex:nextfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 154fe1cb58
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…rsive Replace hardcoded packages array with dynamic detection using yarn package-tools list --recursive to correctly detect all affected packages including dependents. This ensures webex is detected when sub-packages change. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adc729c74c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 986d420e6e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
986d420 to
e8099a8
Compare
- Use exact match grep (^webex$) to avoid matching @webex/* packages - Add fallback to empty arrays for JSON.parse to handle missing outputs
e8099a8 to
1466c7d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1466c7d336
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- For workflow_run triggers, use github.event.workflow_run.head_sha - This ensures commits are compared from Deploy CD head, not current workflow - Fixes incorrect PR detection when triggered by Deploy CD
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5057218ae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…afely - Only extract PR number from merge trailer at end of first line - Avoids matching old PR numbers in revert commits - Use try-catch for JSON parsing to handle special characters in commit messages
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af37bf6b66
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| echo "📦 Tag: ${VERSION}, PR: #${PR_NUMBER}" | ||
| # Production mode: get real version from package-tools | ||
| yarn ws:tools | ||
| VERSION=$(yarn package-tools sync --tag next --packages webex | awk '{print $3}' | tr -d '%') |
There was a problem hiding this comment.
Derive release version from run data, not mutable npm tag
Using yarn package-tools sync --tag next --packages webex to get VERSION reads the current npm next dist-tag, which is global mutable state and not tied to the triggering Deploy CD run; if another publish updates next before this job executes, comments for this run will announce/link the newer version while PRs were collected from this run’s head_sha. This creates incorrect release/changelog metadata in production comments.
Useful? React with 👍 / 👎.
| const prNumber = prNumbers[0]; | ||
| console.log(`Posting comment to PR #${prNumber}`); | ||
| try { | ||
| const commitsRaw = `${{ steps.get-prs.outputs.commits }}`; |
There was a problem hiding this comment.
Avoid embedding commits JSON directly in template literal
${{ steps.get-prs.outputs.commits }} is injected into a JavaScript template literal before JSON.parse, so commit subjects containing backticks or ${...} still break script parsing and abort comment posting; this is a realistic input (the repo history already includes backticks in commit titles). Pass the JSON via environment/input encoding rather than source interpolation to keep parsing robust.
Useful? React with 👍 / 👎.
- Check if packages list is empty after stripping braces - Default to webex when no packages detected - Prevents blank package= in changelog URL
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a125197b0c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # Get packages with --recursive to include dependent packages (like webex) | ||
| # This ensures that if @webex/plugin-meetings changes, webex is also detected | ||
| if [ -n "$PREVIOUS_TAG" ]; then | ||
| PACKAGES=$(yarn package-tools list --recursive --since "$PREVIOUS_TAG" 2>/dev/null || echo "webex") |
There was a problem hiding this comment.
Derive changed packages from the same release SHA
Get Merged PRs intentionally computes PRs from github.event.workflow_run.head_sha, but package detection still runs yarn package-tools list --since "$PREVIOUS_TAG" against the checked-out workspace state. When that checkout commit differs from the workflow run head SHA (the exact mismatch this workflow already guards against for PR lookup), the comment can combine PRs from one release with package metadata from another, producing incorrect "Packages updated" content and changelog package links.
Useful? React with 👍 / 👎.
- For workflow_run triggers, use github.event.workflow_run.head_sha - Ensures previous tag comes from same commit used for PR comparison - Fixes mismatched commit range causing wrong/missed PR comments
COMPLETES #< https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-754634 >
This pull request addresses
The Git-hub-bot's package detection was inaccurate because it used manual parsing instead of the existing package-tools CLI, which has better support for detecting affected packages and their dependents.
by making the following changes
Replaced manual parsing logic with
yarn package-toolsfor package detection--recursiveflag to detect dependent packages (e.g., if@webex/plugin-meetingschanges,webexis also detected)Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
Make sure to have followed the contributing guidelines before submitting.