Skip to content

chore(prlint): trigger pr linter from pr reviews#26535

Merged
mergify[bot] merged 6 commits intoaws:mainfrom
kaizencc:conroy/new
Jul 27, 2023
Merged

chore(prlint): trigger pr linter from pr reviews#26535
mergify[bot] merged 6 commits intoaws:mainfrom
kaizencc:conroy/new

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

This ends up being a lot of work. Essentially, the pull_request_review trigger runs the action on the merge branch which does not have the necessary secrets. This workflow has been inspired from github docs on what to do in this situation.

The PR linter takes the commit sha and pr number from the pull_request_target workflow and assumes that those values are available. So we will take those values from pull_request_review, upload them as artifacts and then download them when the pr linter action is triggered by the workflow run.

The code in index.ts hasn't been tested, but should work.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Jul 27, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team July 27, 2023 15:38
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 27, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 27, 2023
Co-authored-by: Momo Kornher <mail@moritzkornher.de>
statuses: read
issues: read
runs-on: ubuntu-latest
needs: download-if-workflow-run
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't this mean download-if-workflow-run always has to run and complete?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes but as far as i can tell, in order to get an output from a previous step you must depend on that step

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so right now if its not a workflow run i skip all individual steps of download-if-workflow-run (but do not skip the job)

Copy link
Copy Markdown
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

@kaizencc Can you add the README entry?

Co-authored-by: Momo Kornher <mail@moritzkornher.de>
@mrgrain mrgrain added the pr/do-not-merge This PR should not be merged at this time. label Jul 27, 2023
@kaizencc kaizencc removed the pr/do-not-merge This PR should not be merged at this time. label Jul 27, 2023
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 6d3b484
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 27, 2023

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).

@mergify mergify bot merged commit f9eddc9 into aws:main Jul 27, 2023
@kaizencc kaizencc deleted the conroy/new branch July 28, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants