Gitential-com / feedback

This repo is a place to report bugs, give feedback, and share ideas on how we can improve Gitential — Thanks!
2 stars 1 forks source link

Jenkins Squash-and-Merge #2

Open kszucs opened 7 years ago

kszucs commented 7 years ago

Jenkins seem to have much more credit than it actually deserves -- cite>@tiry</cite

The problem is twofold:

  1. Jenkins automatically does a squash-and-merge and we lose a lot of information from actual commits.

  2. and switches committer and author identities

    nuxeo $ git cat-file -p 55ac4b591fe2cbf13ccbb6f158e8a5c961adb1f0                                                                                                                                            
    tree 86f4a376de53e03be7c0d4fef4959e0b07524ede
    parent 9c9790e766485194343877783a83198ab92d405e
    author Jenkins Nuxeo <jenkins@nuxeo.com> 1507046274 +0200
    committer Bruno Ribeiro <ribeiro.pt@gmail.com> 1507046274 +0100

    whereas GitHub does not

    ibis $ git cat-file -p 3324d1f2d1a6d9c04c6a556e9627bd4424725f43                                                                                                                                       
    tree 8b3e9b35067bae04129a88ad8588620d2627a8fb
    parent 5b16ba52abb1cd874eb8cba7472f97aba42df561
    author Szucs Krisztian <szucs.krisztian@gmail.com> 1508108969 -0400
    committer Phillip Cloud <cpcloud@gmail.com> 1508108969 -0400

    finally becames a 10x programmer.

    The differrence between author and committer is explained on SO.

kszucs commented 7 years ago

First but less elegant solution is:

  1. Don't squash (rebasing is OK though)
  2. Somehow instrument Jenkins to not switch identities

Con: need to change git flow Pro: doesn't require gitential effort :)

Second less error prone one:

  1. Fetch and analyze refs/pull/* references
  2. Filter out squashed commits to not count the changes twice

Con: identifying squashes is not that trivial* Pro: doesn't require user effort :)

*we could just blacklist jenkins but that way we might double-count non-jenkins PRs

kszucs commented 7 years ago

@tiry @atchertchian Sorry for the delay!

Sadly github removes the refs/pull/<pr_id>/merge references after a PR actually got merged, so there is currently no way to identify S&M commits without consuming the GitHub API. I've also contacted GH support to keep those references, my request has landed to the wishlist. This is particularly frustrating, because solving this via the API requires an order of magnitude more effort...

Whatever, I'm currently developing the following feature to give You better results:

kszucs commented 6 years ago

@tdna what is the state of excluding users on the frontend?