Skip to content

Use git rebase, GH CLI and clean up code#6

Merged
ananos merged 6 commits intomainfrom
feat_gh_checkout_rebase
Mar 30, 2026
Merged

Use git rebase, GH CLI and clean up code#6
ananos merged 6 commits intomainfrom
feat_gh_checkout_rebase

Conversation

@papazof
Copy link
Copy Markdown
Collaborator

@papazof papazof commented Mar 29, 2026

Use git rebase, GH CLI and clean up code:

  • Parse pr_user in the same way as pr_reviewers, pr_approver
  • Use git rebase instead of creating/applying patches
  • Use GH CLI to fetch and parse PR information
  • Use action/checkout to check out the PR branch and add token input to properly handle checkout access permissions
  • Add step to check if trailers exist and avoid re-adding existing trailers
  • Improve user parsing for bots/apps
  • Clean up steps, variable names and use GITHUB_OUTPUT instead of GITHUB_ENV

Use target branch from github variables instead of using hardcoded
master or main

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Remove special characters from `pr_user` as we do for `pr_reviewers`
and `pr_approver`

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Replace git format-patch/am with git rebase

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Add CI workflow to validate action code

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Use GH CLI in place of manual CURL calls, add check for existing
trailers and clean up code logic:
- Use GH CLI to fetch and parse PR information
- Use `action/checkout` to check out the PR branch and add `token` input
  to properly handle checkout access permissions. Use a subdirectory to
  avoid messing up previous checkouts in `GITHUB_WORKSPACE`.
- Add step to check if trailers exist and avoid re-adding existing
  trailers. Add inputs to control if the action will only check for the
  existence of required trailers and, optionally, fail if the trailers
  do not exist. Add output with the check result, updated by the
  addition of the trailers.
- Improve user parsing by stripping '[bot]' from fetched app/bot logins
  and searching in both user-info keys and names for bot users
- Clean up steps, variable names and use `GITHUB_OUTPUT` instead of
  `GITHUB_ENV`

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
@papazof papazof requested a review from ananos March 29, 2026 22:09
Copy link
Copy Markdown
Member

@ananos ananos left a comment

Choose a reason for hiding this comment

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

thanks @papazof

@ananos ananos merged commit ae89050 into main Mar 30, 2026
5 checks passed
@ananos ananos deleted the feat_gh_checkout_rebase branch March 30, 2026 00:10
@ananos ananos restored the feat_gh_checkout_rebase branch March 30, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants