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

Investigate cherry picking automation #2669

Closed
GCHQ-Developer-530 opened this issue Oct 29, 2024 · 12 comments
Closed

Investigate cherry picking automation #2669

GCHQ-Developer-530 opened this issue Oct 29, 2024 · 12 comments
Milestone

Comments

@GCHQ-Developer-530
Copy link
Contributor

GCHQ-Developer-530 commented Oct 29, 2024

Summary

At the moment we're merging work into develop and then cherry picking the commits into V3 develop. There's quite a bit of human error here though as we might miss some commits going into V3. It would be good if there was a way of automating it.

💬 Description

Look into whether we can have a github workflow that:

  • Gets triggered after a merge into develop
  • Gets any new commit ids
  • Cherry picks them into a new branch off V3
  • Opens a PR from the new branch to V3 develop

Also make the same workflow on the design system repo too.

Why do we need it?

Reduce the likelihood of skipping commits when cherry picking.

@evenstensberg
Copy link
Contributor

Can I fix this?

@GCHQ-Developer-530
Copy link
Contributor Author

Hi @evenstensberg, yeah of course, go for it! As long as it's all standard action work and no third party usage, then that'd be great

@evenstensberg
Copy link
Contributor

@GCHQ-Developer-530 Okay, great. Why don't you just git rebase develop v3 from the develop branch instead of cherry-picking?

@GCHQ-Developer-530
Copy link
Contributor Author

We previously had an action doing that, however there were always too many merge conflicts and we'd have to do it manually. We noticed that a couple of times work went missing by us doing it manually, so cherry picking is the best way moving forward.

@evenstensberg
Copy link
Contributor

I'll fix this after #2617 is merged.

@GCHQ-Developer-530
Copy link
Contributor Author

We need to get #2617 checked by someone internally who is currently on leave so that PR is on hold for a bit. We'd like to get this one resolved as soon as possible as it's slowing the team down.

@evenstensberg
Copy link
Contributor

@GCHQ-Developer-530 let me know if you have any issues/questions.

The action should be up and running after you've added the GitHub credentials and enabled the action.

@ad9242
Copy link
Contributor

ad9242 commented Nov 6, 2024

Currently having some issues with permissions trying to push the newly created branch: eg: https://github.com/mi6/ic-ui-kit/actions/runs/11701936408/job/32589576253

moved back to "ready for dev" for further investigation

@evenstensberg
Copy link
Contributor

evenstensberg commented Nov 6, 2024

@ad9242 I can't change any permissions myself, but I can find articles/links to what needs to be adjusted in the GitHub settings(?)

Edit: Issue is fixed, feel free to close.

@ad9242
Copy link
Contributor

ad9242 commented Nov 8, 2024

the action seems to squash multiple commits from the initial PR into a single one, so we currently need to find a way to maintain all the original commits

EDIT: we think it's just getting the final merge commit

@evenstensberg
Copy link
Contributor

evenstensberg commented Nov 8, 2024

I’ve read the docs and it doesn’t support cherry picking each commit from a pr. I’ll see if there’s some other actions that supports that

Update: I've done some googling and it seems that all the cherry-pick actions use the merge commit and not the individual commits on the branch, so I think you will need to cherry-pick manually if this isn't the way to go.

Update: You could just re-submit the PRs you merge to the v3/develop branch, the commit ids are the same, no?

@MI6-255 MI6-255 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
@github-project-automation github-project-automation bot moved this from Ready for dev to Done in Intelligence Community Design System Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants