get branch commit belongs to #142

Merged
lunny merged 1 commits from adelowo/master into master 2019-02-03 23:53:30 +00:00
Owner

Author: @adelowo

This allows us to get the branch a commit belongs to.

If commit oooo is on master and a_feature_branch, it defaults to master as the result. I have gone through GitHub's implementation and it is the same. Here is an example, 7cb1d8296d exists on master and release/v1.7 but it defaults to showing master

Needed to fix https://github.com/go-gitea/gitea/issues/5473

Author: @adelowo This allows us to get the branch a commit belongs to. If commit `oooo` is on `master` and `a_feature_branch`, it defaults to `master` as the result. I have gone through GitHub's implementation and it is the same. Here is an example, https://github.com/go-gitea/gitea/commit/7cb1d8296dbb35fa9b76666fc741bcb129467cd7 exists on `master` and `release/v1.7` but it defaults to showing `master` Needed to fix https://github.com/go-gitea/gitea/issues/5473
Author
Owner

Author: @codecov-io

Codecov Report

Merging #142 into master will increase coverage by 0.05%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
+ Coverage   33.71%   33.76%   +0.05%     
==========================================
  Files          28       28              
  Lines        1827     1833       +6     
==========================================
+ Hits          616      619       +3     
- Misses       1132     1134       +2     
- Partials       79       80       +1
Impacted Files Coverage Δ
commit.go 10.94% <ø> (ø) ⬆️
repo_commit.go 25.28% <50%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d04f81a...de805d0. Read the comment docs.

Author: @codecov-io # [Codecov](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=h1) Report > Merging [#142](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=desc) into [master](https://codecov.io/gh/go-gitea/git/commit/d04f81a6f8979be39da165fc034447a805071b97?src=pr&el=desc) will **increase** coverage by `0.05%`. > The diff coverage is `50%`. [![Impacted file tree graph](https://codecov.io/gh/go-gitea/git/pull/142/graphs/tree.svg?width=650&token=sCATTcwuUJ&height=150&src=pr)](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #142 +/- ## ========================================== + Coverage 33.71% 33.76% +0.05% ========================================== Files 28 28 Lines 1827 1833 +6 ========================================== + Hits 616 619 +3 - Misses 1132 1134 +2 - Partials 79 80 +1 ``` | [Impacted Files](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [commit.go](https://codecov.io/gh/go-gitea/git/pull/142/diff?src=pr&el=tree#diff-Y29tbWl0Lmdv) | `10.94% <ø> (ø)` | :arrow_up: | | [repo\_commit.go](https://codecov.io/gh/go-gitea/git/pull/142/diff?src=pr&el=tree#diff-cmVwb19jb21taXQuZ28=) | `25.28% <50%> (+0.57%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=footer). Last update [d04f81a...de805d0](https://codecov.io/gh/go-gitea/git/pull/142?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Author
Owner

Author: @lunny

Why not we give more than one branch? Maybe it's better than github and almost have the same performance.

Author: @lunny Why not we give more than one branch? Maybe it's better than github and almost have the same performance.
This repo is archived. You cannot comment on pull requests.
No description provided.