samson icon indicating copy to clipboard operation
samson copied to clipboard

Differentiate non-PR commits

Open pitr opened this issue 11 years ago • 8 comments

Currently "Commits" tab on deploy page shows all commits. There is no way to see if there are commits that aren't part of a PR (eg. commits directly to master). This is especially dangerous if deploying somebody else's code. How about greying-out PR commits, or use bold for non-PR commits? Thoughts?

pitr avatar Nov 10 '14 14:11 pitr

Or maybe show PR number next to each commit, like this? screen shot 2014-11-14 at 14 40 13

pitr avatar Nov 14 '14 19:11 pitr

@fneves @pswadi-zendesk @steved555 is this a good idea?

pitr avatar Dec 04 '14 19:12 pitr

Yeah, I kind of like it, might be really useful.

steved avatar Dec 04 '14 19:12 steved

damn, it's a bit more complicated than what I thought. I'd have to find all commits per every pull request. N+1 HTTP request problem. Doesn't seem like a godd idea any more :cry:

pitr avatar Dec 04 '14 22:12 pitr

Oh huh, I guess I thought they would've added that feature to the API too. Hopefully they will.

steved avatar Dec 04 '14 22:12 steved

I like the idea. Can't we just list all the PRs with one call and, on the local repo, calculate all the commits that belong to that PR? It should just be a matter of following the parent of the merge commit up to the fork-point.

fneves avatar Dec 05 '14 11:12 fneves

GitHub support suggested we use their issue search api and query quth commit sha. Something like https://api.github.com/search/issues?q=08e7991%20repo:zendesk/samson would return the following:

{
  "total_count": 1,
  "items": [{
    "html_url": "https://github.com/zendesk/samson/pull/210",
    "number": 210,
    "title": "use a karma helper for angular testing",
    // ...
  }]
}

pitr avatar Dec 05 '14 21:12 pitr

@fneves good idea using local repo. Pull Request API returns head and base commit sha, so it's a matter of checking which commits are part of which base..head.

pitr avatar Dec 05 '14 21:12 pitr