Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of commits ahead/behind in branch overview #6695

Merged
merged 12 commits into from May 5, 2019

Conversation

@saitho
Copy link
Contributor

commented Apr 20, 2019

Resolves #5628.

branch-ahead-behind

Will have to check how that works with forked repositories. And I want to look into also showing the information in branch select fields (mentioned in #5326) Therefore this PR is WIP.

saitho added some commits Apr 20, 2019

Call Git API to determine divergence of a branch and its base branch
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
Show commit divergance in branch list
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
Adds missing comment
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

@saitho saitho force-pushed the saitho:feature/5628-show_commit_divergence branch from 1272725 to a4bc299 Apr 27, 2019

Adds test for diverging commits
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
@codecov-io

This comment has been minimized.

Copy link

commented Apr 27, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@c1da790). Click here to learn what that means.
The diff coverage is 59.57%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6695   +/-   ##
=========================================
  Coverage          ?   41.17%           
=========================================
  Files             ?      424           
  Lines             ?    58459           
  Branches          ?        0           
=========================================
  Hits              ?    24073           
  Misses            ?    31201           
  Partials          ?     3185
Impacted Files Coverage Δ
modules/templates/helper.go 48.85% <100%> (ø)
modules/git/repo.go 64.17% <47.82%> (ø)
modules/repofiles/commit.go 50% <50%> (ø)
routers/repo/branch.go 56.61% <66.66%> (ø)

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 c1da790...3fc722f. Read the comment docs.

Try comparing commits instead of branches
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
@saitho

This comment has been minimized.

Copy link
Contributor Author

commented Apr 27, 2019

Not sure why the tests fail on DroneCI. I reset my local repository and recreated it from scratch the same way as DroneCI does it. The test work for me, not on CI... :(

Removes test as CI can't run it
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

@saitho saitho marked this pull request as ready for review Apr 28, 2019

@saitho

This comment has been minimized.

Copy link
Contributor Author

commented Apr 28, 2019

For now I removed the test I created, as I couldn't figure out what I had to do in order to successfully run it via DroneCI. => Ready for review.

@saitho

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

@lafriks Can you remove the WIP flag? ;)

@lafriks lafriks removed the status/wip label May 1, 2019

@sapk

sapk approved these changes May 2, 2019

Copy link
Member

left a comment

Works great and the PR is simple and effective.
Thanks

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels May 2, 2019

templates/repo/branch/list.tmpl Outdated Show resolved Hide resolved
Adjusts signature of percentage function to allow providing multiple …
…integers as numerator

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
models/repo.go Outdated Show resolved Hide resolved
Moves CountDivergingCommits function into repofiles module
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
@saitho

This comment has been minimized.

Copy link
Contributor Author

commented May 4, 2019

@lunny Done :)

@lunny

lunny approved these changes May 5, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels May 5, 2019

lunny added some commits May 5, 2019

@lafriks lafriks merged commit 55a8e12 into go-gitea:master May 5, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details

@lunny lunny added the changelog label May 6, 2019

@saitho saitho deleted the saitho:feature/5628-show_commit_divergence branch May 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.