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

gha: increase commits cherry-picked in backport #23451

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

andrewhsu
Copy link
Member

@andrewhsu andrewhsu commented Sep 24, 2024

The /backport command will only cherry-pick the first 30 commits of the PR. This PR fixes that by cherry-picking all commits.

Also, reduce commit sha from 40 chars to 10 chars for brevity in displaying cherry-pick command.

jira: PESDLC-2095

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

The results from `gh api` will have multiple pages if too many. This is
usually around 30 results for /commits. Using `--paginate` will retrieve
all pages. Also, reduce git commit hash to 10 for brevity in the
cherry-pick command.
@andrewhsu andrewhsu requested a review from a team as a code owner September 24, 2024 07:31
@andrewhsu andrewhsu requested review from clee and removed request for a team September 24, 2024 07:31
@andrewhsu andrewhsu mentioned this pull request Sep 24, 2024
7 tasks
@andrewhsu andrewhsu requested a review from gousteris September 24, 2024 14:18
Copy link
Contributor

@clee clee left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewhsu andrewhsu merged commit 7558dee into dev Sep 24, 2024
14 checks passed
@andrewhsu andrewhsu deleted the PESDLC-2095-inc-cherry-picks branch September 24, 2024 19:38
@@ -117,7 +117,7 @@ jobs:
GITHUB_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }}
id: backport_commits
run: |
backport_commits=$(gh api "repos/$TARGET_FULL_REPO/pulls/$BACKPORT_PR_NUMBER/commits" --jq .[].sha | paste -s -d ' ' -)
backport_commits=$(gh api "repos/$TARGET_FULL_REPO/pulls/$BACKPORT_PR_NUMBER/commits" --paginate --jq '.[].sha[0:10]')
Copy link
Member

Choose a reason for hiding this comment

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

wow nice catch.

do we know if any past backports were affected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants