Bug 240139 - [git-webkit] Automatically file bug
Summary: [git-webkit] Automatically file bug
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
: 240339 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-05 13:52 PDT by Jonathan Bedard
Modified: 2022-05-24 00:00 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2022-05-05 13:52:57 PDT
git-webkit should allow callers to automatically create a bug if no bug URL is provided and project defines an issue tracker.
Comment 1 Radar WebKit Bug Importer 2022-05-05 13:57:26 PDT
<rdar://problem/92818331>
Comment 2 Jonathan Bedard 2022-05-05 16:04:39 PDT
Pull request: https://github.com/WebKit/WebKit/pull/531
Comment 3 EWS 2022-05-05 17:49:40 PDT
Committed r293875 (250333@main): <https://commits.webkit.org/250333@main>

Reviewed commits have been landed. Closing PR #531 and removing active labels.
Comment 4 Jonathan Bedard 2022-05-18 15:44:26 PDT
*** Bug 240339 has been marked as a duplicate of this bug. ***
Comment 5 Manuel Rego Casasnovas 2022-05-19 04:51:34 PDT
How does this work?

For example I have a local commit with
    Need the bug URL (OOPS!).

Then I do "Tools/Scripts/git-webkit upload" and nobody asks to open a new bug, and a new bug is not opened.

I believe with "webkit-patch" that worked automatically.

Thanks.
Comment 6 Jonathan Bedard 2022-05-19 10:26:47 PDT
(In reply to Manuel Rego Casasnovas from comment #5)
> How does this work?
> 
> For example I have a local commit with
>     Need the bug URL (OOPS!).
> 
> Then I do "Tools/Scripts/git-webkit upload" and nobody asks to open a new
> bug, and a new bug is not opened.
> 
> I believe with "webkit-patch" that worked automatically.
> 
> Thanks.

Can you share a little more about what branch your commit is on? And is this a commit created by `git-webkit upload`, or is it one you created with `git commit`. This behavior is currently tied to the creation of a PR branch, `git-webkit branch` while main is checked out is the more narrow example.

As a side note, I wonder if `git-webkit commit -i <bug title> should also trigger bug creation....
Comment 7 Manuel Rego Casasnovas 2022-05-19 12:39:38 PDT
(In reply to Jonathan Bedard from comment #6)
> Can you share a little more about what branch your commit is on? And is this
> a commit created by `git-webkit upload`, or is it one you created with `git
> commit`. This behavior is currently tied to the creation of a PR branch,
> `git-webkit branch` while main is checked out is the more narrow example.

So I'm in main branch.

Then I do "git checkout -b my-new-branch", and I work on that one on a patch. And then I use "git commit" to create a commit for my patch.

When I do "git-webkit upload" I don't get asked about the bug thing.
In the past with "webkit-patch upload -g HEAD" I did get asked for the bug thing. Even without committing changes I could do the same with "webkit-patch".

I've just tried a similar workflow from main:
  git checkout -b my-new-branch
  Tools/Scripts/git-webkit commit
  Tools/Scripts/git-webkit upload

Still no prompt to create a new bug.

It's true that if I just do "Tools/Scripts/git-webkit branch" I get the prompt for entering the issue URL or tile of the new issue.
Comment 8 Jonathan Bedard 2022-05-20 16:02:30 PDT
(In reply to Manuel Rego Casasnovas from comment #7)
> (In reply to Jonathan Bedard from comment #6)
> > Can you share a little more about what branch your commit is on? And is this
> > a commit created by `git-webkit upload`, or is it one you created with `git
> > commit`. This behavior is currently tied to the creation of a PR branch,
> > `git-webkit branch` while main is checked out is the more narrow example.
> 
> So I'm in main branch.
> 
> Then I do "git checkout -b my-new-branch", and I work on that one on a
> patch. And then I use "git commit" to create a commit for my patch.
> 
> When I do "git-webkit upload" I don't get asked about the bug thing.
> In the past with "webkit-patch upload -g HEAD" I did get asked for the bug
> thing. Even without committing changes I could do the same with
> "webkit-patch".
> 
> I've just tried a similar workflow from main:
>   git checkout -b my-new-branch
>   Tools/Scripts/git-webkit commit
>   Tools/Scripts/git-webkit upload
> 
> Still no prompt to create a new bug.
> 
> It's true that if I just do "Tools/Scripts/git-webkit branch" I get the
> prompt for entering the issue URL or tile of the new issue.

It's the `-b my-new-branch` part that is preventing the prompt....the assumption is that by providing a branch name instead of a bug title, you don't want us to create a new bug. This might be a bad assumption, which is why I'm wondering if `git-webkit commit` should assume you want to create a bug if you don't pass a bug ID and aren't amending a commit.
Comment 9 Manuel Rego Casasnovas 2022-05-24 00:00:38 PDT
(In reply to Jonathan Bedard from comment #8)
> It's the `-b my-new-branch` part that is preventing the prompt....the
> assumption is that by providing a branch name instead of a bug title, you
> don't want us to create a new bug. This might be a bad assumption, which is
> why I'm wondering if `git-webkit commit` should assume you want to create a
> bug if you don't pass a bug ID and aren't amending a commit.

Ok, thanks. Now I understand how it works.

Just to explain my workflow, in case you find it useful. I do local branches and local commits all the time. Most of them are basically experiments here and there or whatever. Things mostly for myself.

Once I have a branch that has something useful, then I run the "git-webkit upload" command. At that point is when I'd like to get asked about creating a new bug or not.
Even at that point I'd be happy to provide a bug number, if it already exists, to pre-fill some of the commit message with it.

Probably other people workflow differs. But this workflow was working nicely with "webkit-patch upload".
And it also works in Chromium, where the "magic" only happens when you do "git cl upload" (the local branches and commits are totally independent of the rest of stuff).