-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
[ci] PR Review Companion should be called iff there is diffed content from PR Test #28579
Comments
We should also consider that the workflow triggered by If we use the
Append: We could set read-only permission for the build job! Implementation: #28617 |
Thanks @yin1999 - I like the after-build job. In your PR I think we can go the route of reusable workflows to keep the logic isolated and avoid huge There's some examples here that we might want to consider: https://github.com/bsmth/reusable-workflow-example/blob/main/.github/workflows/upload-artifact.yml Calling the workflow from another will keep the context of the "main" workflow: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context I agree we could use outputs or define a workflow-scoped boolean ('needs_preview' or something) and in the job that calls the review companion, we can check if it needs to be run or not like: call-workflow:
needs: upload-artifact
if: ${{ env.NEEDS_PREVIEW }}
uses: ./.github/workflows/review_companion.yml What do you think? |
Yes. I like this idea :) |
Super, thank you! closing as done now 🎉 |
summary:
./files
directoryCurrent behavior:
.github/workflows/pr-review-companion.yml
:We call the PR review companion from the PR Test workflow if it passes:
.github/workflows/pr-test.yml
:proposal:
What we want to do is to call the PR companion only if there are changes in the files we care about:
.github/workflows/pr-review-companion.yml
:We call the PR companion from "PR Test" if we have changes in the files we care about:
.github/workflows/pr-test.yml
:The text was updated successfully, but these errors were encountered: