Skip to content

feat(codepipeline-actions): expose PR-specific variables in CodeStarConnectionsSourceAction#37185

Open
hmkim wants to merge 3 commits intoaws:mainfrom
hmkim:feat/codestar-pr-variables
Open

feat(codepipeline-actions): expose PR-specific variables in CodeStarConnectionsSourceAction#37185
hmkim wants to merge 3 commits intoaws:mainfrom
hmkim:feat/codestar-pr-variables

Conversation

@hmkim
Copy link
Copy Markdown

@hmkim hmkim commented Mar 6, 2026

Summary

  • Add sourceBranchName, destinationBranchName, pullRequestId, and pullRequestTitle to CodeStarSourceVariables interface and the variables getter
  • These variables are available when a pipeline is triggered by a PR event but were previously only accessible via a private method workaround: (sourceAction as any)['variableExpression']('SourceBranchName')
  • Non-breaking additive change (new readonly properties on an output interface)

Closes #31000

Test plan

  • Added unit test verifying PR-specific variables resolve to correct #{NS.SourceBranchName} etc. expressions
  • All existing tests continue to pass (9/9)

🤖 Generated with Claude Code

…onnectionsSourceAction

Add SourceBranchName, DestinationBranchName, PullRequestId, and
PullRequestTitle to CodeStarSourceVariables interface and the
variables getter. These variables are available when a pipeline is
triggered by a PR event but were previously only accessible via a
private method workaround.

Closes aws#31000

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aws-cdk-automation aws-cdk-automation requested a review from a team March 6, 2026 15:44
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Mar 6, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

…ntegration test

Add documentation for PR-specific variables (sourceBranchName, destinationBranchName,
pullRequestId, pullRequestTitle) and update the pipeline-with-pipeline-triggers integ
test to exercise them in the PR-triggered pipeline.
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 6, 2026 16:09

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results24 ran24 passed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results with resolved templates24 ran23 passed1 failed
TestResult
Security Guardian Results with resolved templates
packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-pipeline-triggers.js.snapshot/aws-cdk-codepipeline-with-pipeline-triggers.template.json
iam-role-root-principal-needs-conditions.guard❌ failure

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-codepipeline-actions: CodeStarConnectionsSourceAction.variables inaccurate

3 participants