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

Add automatic cherry-pick workflow #90

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

micaeljtoliveira
Copy link
Contributor

This workflow allows to cherry-pick commits from a PR into a list of target branches. A new PR will be created for each target branch. This is triggered by a comment on the pull request of the following form:

cherry-pick <hash_1> <hash_2> ... <hash_n> into <branch_1> <branch_2> ... <branch_n>

Planned/missing features:

  • cherry-picking into a different git repo (e.g. cherry-pick abcd into MOM6-CICE6-WW3/1deg_jra55do_ryf
  • wildcards in repos/branches (e.g. cherry-pick abcd into MOM6-CICE6-WW3/*
  • multiple commands in a single comment

Contributes to COSIMA/access-om3#119

@micaeljtoliveira micaeljtoliveira added the CI Continuous integration infrastructure label Jul 25, 2024
Copy link
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

Some comments. Hope they are useful.

Note I looked at the second part with the cherry-pick machinery, but not in detail.

.github/workflows/automatic-cherry-pick.yaml Outdated Show resolved Hide resolved
.github/workflows/automatic-cherry-pick.yaml Show resolved Hide resolved
Copy link
Contributor

@CodeGat CodeGat left a comment

Choose a reason for hiding this comment

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

Just a few requests. Very cool stuff in here.

.github/workflows/automatic-cherry-pick.yaml Outdated Show resolved Hide resolved
.github/workflows/automatic-cherry-pick.yaml Show resolved Hide resolved
.github/workflows/automatic-cherry-pick.yaml Show resolved Hide resolved
.github/workflows/automatic-cherry-pick.yaml Show resolved Hide resolved
@micaeljtoliveira
Copy link
Contributor Author

@aidanheerdegen @CodeGat Thanks for the reviews! I'll update the code tomorrow.

 - Improved logic when local for wrong command syntax.
 - Use env variables to declare PR comments body. This removes the need to escape some characters.
 - Improve comments in a couple of places.
@micaeljtoliveira
Copy link
Contributor Author

@aidanheerdegen @CodeGat I've addressed your comments in 7166e82. Let me know if you have any further comments.

Copy link
Contributor

@CodeGat CodeGat left a 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. I don't have write permissions on this repo, so my review won't help with the mergability of this PR.
As an aside, how did you test this workflow? I've found that creating a seperate org for GitHub Actions testing works well - but I'm sure you've tested it all piecewise anyway!

@aekiss aekiss self-requested a review July 26, 2024 03:00
Copy link
Contributor

@aekiss aekiss left a comment

Choose a reason for hiding this comment

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

Thanks all (especially Micael) - looks like great work!
I'm in no position to review, but I'm happy to approve.

@micaeljtoliveira
Copy link
Contributor Author

Okay, lets merge this and let people give it a try 🚀

@micaeljtoliveira micaeljtoliveira merged commit 871e1d5 into main Jul 26, 2024
@access-hive-bot
Copy link

This pull request has been mentioned on ACCESS Hive Community Forum. There might be relevant details there:

https://forum.access-hive.org.au/t/poster-automated-workflows-for-management-of-model-configurations/3608/4

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

Successfully merging this pull request may close these issues.

5 participants