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

upload: Add "branch-format" config option and commit tag #167

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

jerry-skydio
Copy link
Collaborator

@jerry-skydio jerry-skydio commented Mar 13, 2024

Branch-format will let you control how branches are named,
which has an effect on when branches collide. This can be
set on cmdline, from config file, or on a topic-by-topic
basis inside the commit text.

user+branch is the default today and will remain the default.
Branch names will never collide if using this, but you cannot
retarget to other base branches, and you must use Uploader: if
another user wants to push to this branch.

user allows retargeting prs to other base branches, but will
not allow multiple base-branches to be specified. if they are,
it will warn to specify user+branch instead.

branch will allow others to upload to the same pr, but uploader:
cannot be used.

none includes both limitations and features of user and branch.

I don't really believe there's good use cases for branch and none,
but i'm implementing them to be complete.

Fixes: #11

@jerry-skydio
Copy link
Collaborator Author

jerry-skydio commented Mar 13, 2024

Reviews in this chain:
#167 upload: Add "branch-format" config option and commit tag

@jerry-skydio
Copy link
Collaborator Author

jerry-skydio commented Mar 13, 2024

# head base diff date summary
0 6a9b2f55 29f86bf3 diff Mar 13 13:29 PM 3 files changed, 37 insertions(+), 5 deletions(-)
1 ff9c9981 2d6c7c26 diff Mar 13 13:40 PM 2 files changed, 3 insertions(+), 4 deletions(-)
2 e0d33ebc 2d6c7c26 diff Mar 13 13:41 PM 1 file changed, 1 deletion(-)
3 02f6d399 573558fe diff Mar 13 13:46 PM 1 file changed, 17 insertions(+), 14 deletions(-)
4 7ed5f674 3a19895f rebase Mar 13 13:50 PM 0 files changed
5 3730eed6 3a19895f diff Mar 13 14:02 PM 1 file changed, 11 insertions(+), 2 deletions(-)
6 f60b13a9 e370a376 rebase Mar 13 14:02 PM 0 files changed
7 051b8f7f 8c17f143 rebase Mar 13 14:03 PM 0 files changed
8 83b6db28 98552230 diff Mar 13 14:04 PM 1 file changed, 1 insertion(+), 1 deletion(-)
9 62c9a476 c51d4cb3 rebase Mar 13 14:12 PM 0 files changed
10 1a5080fe c4ee1e20 rebase Mar 13 14:14 PM 0 files changed
11 a8eb317f 7ce245cb rebase Mar 13 14:15 PM 0 files changed
12 5952c05d 1dd80d5e diff Mar 13 14:17 PM 0 files changed
13 1ed3dddc 1dd80d5e diff Mar 13 14:19 PM 1 file changed, 1 insertion(+), 1 deletion(-)
14 dfdff148 c4ace457 diff Mar 13 14:54 PM 1 file changed, 2 insertions(+), 1 deletion(-)

@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/brformt branch 2 times, most recently from ff9c998 to e0d33eb Compare March 13, 2024 20:42
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/brformt branch 3 times, most recently from 3730eed to f60b13a Compare March 13, 2024 21:03
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/prbody branch 2 times, most recently from e370a37 to 8c17f14 Compare March 13, 2024 21:04
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/brformt branch 2 times, most recently from 83b6db2 to 62c9a47 Compare March 13, 2024 21:13
Base automatically changed from jerry/revup/main/prbody to main March 13, 2024 21:17
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/brformt branch 2 times, most recently from 5952c05 to 1ed3ddd Compare March 13, 2024 21:20
Copy link
Contributor

@aaron-skydio aaron-skydio left a comment

Choose a reason for hiding this comment

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

Does retargeting automatically with revup upload have the problem of spamming codeowners for changes in between the merge-base of the new and old bases, and the original PR branch? It can't atomically push the branch and change the base branch in github right? I guess I'm a little worried about recommending this if it's going to spam people like that

It seems super annoying but I guess might be possible to

  1. upload the PR relative to the merge-base of the new and old base branches
  2. change the base branch via the github API
  3. maybe reupload on top of the actual new base branch

At least that's what I've done previously if I really wanted to retarget a PR

docs/upload.md Outdated Show resolved Hide resolved
Branch-format will let you control how branches are named,
which has an effect on when branches collide. This can be
set on cmdline, from config file, or on a topic-by-topic
basis inside the commit text.

user+branch is the default today and will remain the default.
Branch names will never collide if using this, but you cannot
retarget to other base branches, and you must use Uploader: if
another user wants to push to this branch.

user allows retargeting prs to other base branches, but will
not allow multiple base-branches to be specified. if they are,
it will warn to specify user+branch instead.

branch will allow others to upload to the same pr, but uploader:
cannot be used.

none includes both limitations and features of user and branch.

I don't really believe there's good use cases for branch and none,
but i'm implementing them to be complete.

Fixes: #11
@jerry-skydio
Copy link
Collaborator Author

yes it probably will be spammy depending on which direction it retargets. ex 31.6-> master will be spammy because we need to push before updating the bb. the reverse will actually not be too spammy because with the new automerger we expect most of 31.6 to have merged into master already

i don't want to cherry-pick onto the merge base though because it's possible that changes will cherry-pick cleanly on each branch but not on their merge base

@jerry-skydio
Copy link
Collaborator Author

at this point i've seen enough limitations / spam in the codeowners system that i think the issue is more with it and not necessarily other tools.

whether we recommend it is maybe a different question but i think it's useful enough that there should be some way for revup to configure it

@jerry-skydio jerry-skydio merged commit d29851a into main Mar 13, 2024
5 checks passed
@jerry-skydio jerry-skydio deleted the jerry/revup/main/brformt branch March 13, 2024 22:44
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.

Allow branch naming configuration: "user_base", "user", "base", "none"
2 participants