-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore: prlinter not triggered when "Codebuild PR Build" completes #36057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added steps to save and upload pull request information.
There was a problem hiding this 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)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
This pull request has been removed from the queue for the following reason: Pull request #36057 has been dequeued. The pull request rule doesn't match anymore. The following conditions don't match anymore:
You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
- Extract pull request number and SHA into environment variables - Use env variables instead of inline GitHub context expressions - Improves workflow readability and maintainability - Reduces duplication of GitHub context references in run script
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Added steps to save and upload pull request information.
Issue # (if applicable)
Closes #36055
Reason for this change
THE PROBLEM:
PR Linter can't determine which PR to validate because:
THE SOLUTION:
Add these steps to codebuild-pr-build.yml:
WHY IT WORKS:
KEY INSIGHT:
CONTEXT AVAILABILITY:
Codebuild PR Build (pull_request trigger):
✓ github.event.pull_request.number
✓ github.event.pull_request.head.sha
✓ github.event.pull_request.* (all PR data)
PR Linter (workflow_run trigger):
✗ github.event.pull_request (doesn't exist)
✗ github.event.workflow_run.pull_requests (empty array)
✓ github.event.workflow_run.id (can download artifacts)
ARTIFACT AS BRIDGE:
EXECUTION FLOW WITH FIX:
SUMMARY:
The solution works because it:
See #36055 for details
How do I validate
Test Environment
Validated on fork repository: pahud#16
Validation Steps
codebuild-pr-build.yml(artifact upload steps)pr_infoartifact successfullyResults
✅ Codebuild PR Build: Successfully uploaded
pr_infoartifact containing:pr_number: 16pr_sha: ebeaa4c...✅ PR Linter: Successfully validated PR and applied label
pr/needs-community-reviewEvidence
Before fix:
pr_infoartifact availableAfter fix:
pr_infoartifactNote on Fork Testing
For fork testing only, I added a
pull_request_targetfallback topr-linter.ymlsinceworkflow_runevents don't trigger from fork workflows. This fallback is not needed for aws/aws-cdk as workflows run in the base repository context whereworkflow_runworks correctly.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license