isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Make issue references from the commits more intelligent. #512

Open kenorb opened 9 years ago

kenorb commented 9 years ago

Here is a good example: https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994/issues/1

This issue has plenty of references to commits which has nothing to do with the issue and only confuse people.

Why this is happening?

Because it has some lines like:

[   82.235260] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[   82.243681] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-rc2 #39
[   17.289985] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 6286.808750] CPU: 3 PID: 1304 Comm: bnx2fc_l2_threa Not tainted 3.10.0-121.el7.x86_64 #1
invalid opcode: 0000 [#1] SMP
[    8.536416] Oops: 0000 [#1] PREEMPT PREEMPT
[    8.537863] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc6-00151-ga5c075c #1

which has #1 in it.

So my proposal is to look for the issue references either in the first or the last line of the commit message.

And I'm not sure if this should be a bug or a feature.

cirosantilli commented 8 years ago

Lol, beautiful failure.

Any attempt to parse structured data like #1 from unstructured strings like commit comments is bound to have many failure cases.

The real solution to me before full AI is to only suggest if users want to link or not, but not do automatically for them