Having read this week's meeting notes on this topic:

> we'll get bors to warn people about not putting the issue number in
commit messages

Can anyone elaborate on what this will entail? By "commit message" do you
mean the honest-to-god git commit message, or the Github PR message, or
both? What form will the warning take, and how easy will it be to ignore it
in order to accomodate one-off contributors submitting typo fixes?


On Tue, Feb 18, 2014 at 8:06 AM, Huon Wilson <dbau...@gmail.com> wrote:

>  I wrote a quick & crappy script that automates going from commit -> PR:
>
>     #!/bin/sh
>
>     if [ $# -eq 0 ]; then
>         echo 'Usage: which-pr COMMIT'
>         exit 0
>     fi
>
>     git log master ^$1 --ancestry-path --oneline --merges | \
>         tail -1 | \
>         sed 's@.*#\([0-9]*\) : .*@http://github.com/mozilla/rust/pull/\1@'
>
> Putting this in your path gives:
>
>     $ which-pr 6555b04
>     http://github.com/mozilla/rust/pull/12345
>
>     $ which-pr a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2
>     http://github.com/mozilla/rust/pull/12162
>
> Of course, I'm sure there are corner cases that don't work, and it's
> definitely not as usable as something directly encoded in the commit.
>
>
> Huon
>
>
>
> On 18/02/14 13:17, Nick Cameron wrote:
>
>  Right, that is exactly what I want to see, just on every commit. For
> example,
> https://github.com/mozilla/rust/commit/a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2.
> has none of that info and I can't see any way to get it (without the kind
> of Git-fu suggested earlier). (Well, I can actually see that r=nikomatsakis
> from the comments at the bottom, but I can't see how that r+ came about,
> whether there was any discussion, whether there was an issue where this was
> discussed or not, etc.).
>
>
> On Tue, Feb 18, 2014 at 3:02 PM, Corey Richardson <co...@octayn.net>wrote:
>
>>
>> https://github.com/mozilla/rust/commit/25147b2644ed569f16f22dc02d10a0a9b7b97c7e
>> seems to provide all of the information you are asking for? It
>> includes the text of the PR description, the PR number, the name of
>> the branch, and who reviewed it. I agree with your premise but I'm not
>> sure I agree that the current situation isn't adequate. But I wouldn't
>> be opposed to such a change.
>>
>> On Mon, Feb 17, 2014 at 8:54 PM, Nick Cameron <li...@ncameron.org> wrote:
>> > Whether we need issues for PRs is a separate discussion. There has to be
>> > _something_ for every commit - either a PR or an issue, at the least
>> there
>> > needs to be an r+ somewhere. I would like to see who reviewed something
>> so I
>> > can ping someone with questions other than the author (if they are
>> offline).
>> > Any discussion is likely to be useful.
>> >
>> > So the question is how to find that, when necessary. GitHub sometimes
>> fails
>> > to point to the info. And when it does, you do not know if you are
>> missing
>> > more info. For the price of 6 characters in the commit message (or "no
>> > issue"), we know with certainty where to find that info and that we are
>> not
>> > missing other potentially useful info. This would not slow down
>> development
>> > in any way.
>> >
>> > Note that this is orthogonal to use of version control - you still need
>> to
>> > know Git in order to get the commit message - it is about how one can go
>> > easily from a commit message to meta-data about a commit.
>> >
>> >
>> > On Tue, Feb 18, 2014 at 12:53 PM, Kevin Ballard <ke...@sb.org> wrote:
>> >>
>> >> This is not going to work in the slightest.
>> >>
>> >> Most PRs don't have an associated issue. The pull request is the issue.
>> >> And that's perfectly fine. There's no need to file an issue separate
>> from
>> >> the PR itself. Requiring a referenced issue for every single commit
>> would be
>> >> extremely cumbersome, serve no real purpose aside from aiding an
>> >> unwillingness to learn how source control works, and would probably
>> slow
>> >> down the rate of development of Rust.
>> >>
>> >> -Kevin
>> >>
>> >> On Feb 17, 2014, at 3:50 PM, Nick Cameron <li...@ncameron.org> wrote:
>> >>
>> >> At worst you could just use the issue number for the PR. But I think
>> all
>> >> non-trivial commits _should_ have an issue associated. For really tiny
>> >> commits we could allow "no issue" or '#0' in the message. Just so long
>> as
>> >> the author is being explicit, I think that is OK.
>> >>
>> >>
>> >> On Tue, Feb 18, 2014 at 12:16 PM, Scott Lawrence <byt...@gmail.com>
>> wrote:
>> >>>
>> >>> Maybe I'm misunderstanding? This would require that all commits be
>> >>> specifically associated with an issue. I don't have actual stats, but
>> >>> briefly skimming recent commits and looking at the issue tracker, a
>> lot of
>> >>> commits can't be reasonably associated with an issue. This
>> requirement would
>> >>> either force people to create fake issues for each commit, or to
>> reference
>> >>> tangentially-related or overly-broad issues in commit messages,
>> neither of
>> >>> which is very useful.
>> >>>
>> >>> Referencing any conversation that leads to or influences a commit is a
>> >>> good idea, but something this inflexible doesn't seem right.
>> >>>
>> >>> My 1.5ยข.
>> >>>
>> >>>
>> >>> On Tue, 18 Feb 2014, Nick Cameron wrote:
>> >>>
>> >>>> How would people feel about a requirement for all commit messages to
>> >>>> have
>> >>>> an issue number in them? And could we make bors enforce that?
>> >>>>
>> >>>> The reason is that GitHub is very bad at being able to trace back a
>> >>>> commit
>> >>>> to the issue it fixes (sometimes it manages, but not always). Not
>> being
>> >>>> able to find the discussion around a commit is extremely annoying.
>> >>>>
>> >>>> Cheers, Nick
>> >>>>
>> >>>
>> >>> --
>> >>> Scott Lawrence
>> >>
>> >>
>> >> _______________________________________________
>> >> Rust-dev mailing list
>> >> Rust-dev@mozilla.org
>> >> https://mail.mozilla.org/listinfo/rust-dev
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > Rust-dev mailing list
>> > Rust-dev@mozilla.org
>> > https://mail.mozilla.org/listinfo/rust-dev
>> >
>>
>
>
>
> _______________________________________________
> Rust-dev mailing 
> listRust-dev@mozilla.orghttps://mail.mozilla.org/listinfo/rust-dev
>
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to