-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: allow backporting to remote repository #405
Conversation
651a8d9
to
422a91f
Compare
Thanks @tasso94 🙇 I'm currently enjoying some time off, so it may take me some more time until I review this. But at first glance, this looks amazing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this massive contribution @tasso94 🙇 This will be super useful!
I've had a closer look at the changes and have a few comments, suggestions, and questions. I've used an emoji review code to clarify my comments. Please have a look.
Hi @korthout, Thanks for your review feedback, and I'm sorry for my late response. Right now, I'm a bit busy but I'll try to have a look soon. Stay tuned! Best, |
Hi @korthout, Thank you for providing your input. I applied your review hints. 🙂 👍 I know that I still need to document the new properties. If you don't have any further remarks regarding the naming or characteristics of the properties, I will add the documentation. Is there anything else that is required from my side to make this PR merge-ready? Do you want me to contribute tests? Best, |
3add836
to
eb924e6
Compare
Thanks for the great work @tasso94. I want to give this the proper attention it deserves, but I've been too busy at work as well as in my personal life (with an international move coming up ahead) to review this. Please know that I haven't forgotten about this. I really appreciate this effort and see it as a big improvement to the action. A full review will follow. |
Hi @korthout, Do you already have a plan for when you review my contribution? 🙂 Best, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tasso94 for the improvements. Sorry for taking so long 🙇 I want to give this the attention it deserves, but it was hard to find the time. Now, I finally had a chance to give it a spin, and I'm happy to report that it works! It's really cool to see it in action! 🚀
- Original: case(5): Rebase and merge backport-action-test#365 (comment)
- Backport: [Backport case5-backport-target] case(5): Rebase and merge backport-action/backport-action-test#2
Some notes:
- ❌ There's a small mistake in one of the logs. It refers to
origin
, but actually pushed totarget
. This should be changed before merging. See below. - 💭 I've tried to think a bit more on our usage of the word
remote
to mean the other repository. GitHub usesupstream
as the name for the original repository from the perspective of a forked repository. In that same analogy, what we're currently callingremote
is actually thedownstream
repository. Changes from the original repository are backported to a downstream repository (often a fork). However, I worry thatdownstream
is too unfamiliar to be used here. So, perhaps remote is still the best wording. I'd love your input on this. - 📝 since the default
GITHUB_TOKEN
does not have write access to the other repository, it's mandatory to use a PAT for thetoken
input of the checkout action and thegithub_token
input of the backport-action itself. We should document this alongside these inputs.
Example of log wrongly referring to origin
Push branch to origin
git push --set-upstream target backport-365-to-case5-backport-target
In addition to my ramblings on naming things and the small logging mistake, I only have a few minor suggestions. Please have a look 🙇
👍 I'll be happy to merge this with a bit of documentation
EDIT: Regarding tests, we can do without for now. It would be cool to expand https://github.com/korthout/backport-action-test with some test case for this eventually. But it's fine to only cover this manually for now.
Hi @korthout, Thank you for the review and for bringing up the naming. 🙂 👍 I prefer What do you think? Should we move forward with |
Let's go for it! |
@tasso94 is there anything I can do to help get this merged? |
Hi @korthout, I was quite busy in the last couple of weeks. Best, |
Hi @korthout, Friendly reminder to review my latest changes 🙂 👍 Best, |
If git fetch fails we should clarify which remote was used to fetch from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇 Sorry for taking so long. I was in the process of moving internationally. I'm trying to catch up again now.
❤️ Thanks for the amazing work on this! I love the solutions you found and I'm happy with the naming.
I've taken the liberty to adjust some last small things, but nothing major.
Let's merge this! 🚀 Please try it out in your repository and let me know if you run into any issues. In time, we can promote the inputs from their experimental status.
LGTM 👍
To try this out you can either use:
|
nice, thank you guys! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few small suggestions
this.config.experimental.downstream_owner ?? undefined; | ||
} | ||
|
||
shouldUseDownstreamRepo(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if this doesn't need to be used externally, better make it private
return !!this.downstreamRepo; | ||
} | ||
|
||
getRemote(): "downstream" | "origin" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, could be private
Thanks for the notes @mvayngrib. I'd welcome any pull request with improvements 🙇 Did you already have a chance to try out this functionality? Any feedback is welcome. |
thanks @korthout, i haven't yet, but will share feedback when i do 👍 |
This pull request is still a work in progress, but I wanted to share my first iteration to get feedback early on:
User story
As a user, I maintain my
master
branch and the backport branches in two separate repositories to hide my backport branches from the public.Open tasks
I think the following topics still need to be addressed (is there even more I might not know yet?):