Skip to content
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: use base and head SHAs from context in lint-build-commits workflow #32140

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Apr 23, 2024

Instead of querying the GitHub API for the parent SHA, use the base and head SHA provided by the github.event.pull_request context. This works fine because the workflow only runs on pull requests.

Also use a loop and git checkout instead of git rebase to avoid potential issues with merge conflicts in the presence of merge commits in the PR.

@tklauser tklauser added area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Apr 23, 2024
@tklauser tklauser force-pushed the pr/tklauser/build-commits-no-rebase branch 2 times, most recently from ae7643e to f1773f2 Compare April 23, 2024 13:49
@tklauser tklauser changed the title ci: use base and head SHAs provided by workflow context ci: use base and head SHAs from context in lint-build-commits workflow Apr 23, 2024
@tklauser tklauser force-pushed the pr/tklauser/build-commits-no-rebase branch from f1773f2 to b238aaf Compare April 23, 2024 13:51
@tklauser
Copy link
Member Author

Testing PR here: #32143

@tklauser tklauser force-pushed the pr/tklauser/build-commits-no-rebase branch 3 times, most recently from 22a909b to 222c303 Compare April 24, 2024 09:00
@tklauser tklauser self-assigned this Apr 25, 2024
Instead of querying the GitHub API for the parent SHA, use the base and
head SHA provided by the github.event.pull_request context. This works
fine because the workflow only runs on pull requests.

Also use a loop and git checkout instead of git rebase to avoid
potential issues with merge conflicts in the presence of merge commits
in the PR.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser force-pushed the pr/tklauser/build-commits-no-rebase branch from 222c303 to 9496da4 Compare April 30, 2024 09:20
@tklauser
Copy link
Member Author

@tklauser tklauser marked this pull request as ready for review April 30, 2024 10:45
@tklauser tklauser requested review from a team as code owners April 30, 2024 10:45
@tklauser
Copy link
Member Author

/test

@tklauser tklauser enabled auto-merge April 30, 2024 10:55
@tklauser tklauser added needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Apr 30, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.15.5 Apr 30, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.11 Apr 30, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.13.16 Apr 30, 2024
@tklauser tklauser added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 7e01a7b Apr 30, 2024
64 checks passed
@tklauser tklauser deleted the pr/tklauser/build-commits-no-rebase branch April 30, 2024 12:24
@tklauser tklauser added the backport/author The backport will be carried out by the author of the PR. label May 2, 2024
@nebril nebril added this to Needs backport from main in 1.13.17 May 10, 2024
@nebril nebril removed this from Needs backport from main in 1.13.16 May 10, 2024
@nebril nebril added this to Needs backport from main in 1.14.12 May 10, 2024
@nebril nebril removed this from Needs backport from main in 1.14.11 May 10, 2024
@nebril nebril added this to Needs backport from main in 1.15.6 May 10, 2024
@nebril nebril removed this from Needs backport from main in 1.15.5 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake backport/author The backport will be carried out by the author of the PR. needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch release-note/ci This PR makes changes to the CI.
Projects
1.13.17
Needs backport from main
1.14.12
Needs backport from main
1.15.6
Needs backport from main
Development

Successfully merging this pull request may close these issues.

None yet

2 participants