-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat(get-modified-packages): support retrieving diffs without fetching all #299
Conversation
2547fd9
to
b4135e3
Compare
I've fixed it. Github action PR: First part
Second part
steps:
- name: "Set PR fetch depth"
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: "Checkout PR branch and all PR commits"
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
|
This solution works for both You can test it with existing PRs if you need confirmation using |
Outdated comment. 🖱️Click here to expand🔛 |
Thank you for taking over the job from me and completing it! |
If everyone used it with the default "base-branch" parameter, it won't break existing functionality, anyone using the old version can keep using the new version without modifying any code and it will work the same. But if someone changed the "base-branch" parameter (which is |
We can still bump versions but then it will bump the versions of everything else in this repository too. Then any new change on them needs to be updated on the repository sides too (to v2) even if they were not changed. :( |
I've removed the input parameter because I don't see a use for it. |
@xmfcx |
235cca8
to
498beca
Compare
0f6c357
to
d966cbf
Compare
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
d966cbf
to
3fcb1c4
Compare
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
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.
Looks good to me.
Thank you for working hard on this task!!
To confirm, it is working well for regular PRs in the universe too: |
I have only found one person who uses the |
Description
Continuation from:
ci(build-and-test-differential): set checkout fetch-depth to 1 autoware.universe#7408
Renaming the input parameter name from
base-branch
tobase-ref
. (Mostly it defaults tomain
)merge_group
triggers in the futureIt will run:
git fetch origin ${{ inputs.base-ref }}
to make sure it has common merge-base commit to get diffsAnd now it is possible to only fetch the necessary commits instead of entire history of the repository. (For universe it allows time saving from about 2m30s to 6s)
Separate the
get-modified-packages
action into 2 steps so it will report if it failsset -e
is removed from the script because it is set by default on github actions.Tests performed
Failure condition
It fails on failure.
https://github.com/autowarefoundation/autoware.universe/actions/runs/9482100138/job/26126284417?pr=7340#step:7:29
Success condition
And it is successful on success:
https://github.com/autowarefoundation/autoware.universe/actions/runs/9482151939/job/26126437257?pr=7340#step:7:35
Effects on system behavior
Not applicable.
Interface changes
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.