Skip to content

Comments

fix(ci): fix changelog link in the Github-bot#4739

Open
vamshigovardhana wants to merge 7 commits intowebex:nextfrom
vamshigovardhana:bot-comment
Open

fix(ci): fix changelog link in the Github-bot#4739
vamshigovardhana wants to merge 7 commits intowebex:nextfrom
vamshigovardhana:bot-comment

Conversation

@vamshigovardhana
Copy link
Contributor

@vamshigovardhana vamshigovardhana commented Feb 24, 2026

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-tools for package detection

  • Uses --recursive flag to detect dependent packages (e.g., if @webex/plugin-meetings changes, webex is also detected)
  • Added proper Node.js setup and yarn dependency installation steps
  • Added build step for package-tools before running detection

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@vamshigovardhana vamshigovardhana requested a review from a team as a code owner February 24, 2026 07:22
@vamshigovardhana vamshigovardhana changed the title fix(ci): fix changelog link in PR comment bot fix(ci): fix changelog link in the Github-bot Feb 24, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

- Use exact match grep (^webex$) to avoid matching @webex/* packages
- Add fallback to empty arrays for JSON.parse to handle missing outputs
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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 '%')

Choose a reason for hiding this comment

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

P1 Badge 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 }}`;

Choose a reason for hiding this comment

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

P1 Badge 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
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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")

Choose a reason for hiding this comment

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

P1 Badge 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
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.

1 participant