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

Improve push update options #10105

Merged
merged 6 commits into from
Feb 2, 2020

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 2, 2020

As title.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Feb 2, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 2, 2020
@guillep2k
Copy link
Member

Tests require updating.

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess that the functions should also be exported rather than private

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 2, 2020
modules/repofiles/update.go Outdated Show resolved Hide resolved
@lunny
Copy link
Member Author

lunny commented Feb 2, 2020

@zeripath I have exported all the functions. @6543 maybe another package structs? But I think it's not this PR.

@6543
Copy link
Member

6543 commented Feb 2, 2020

@zeripath I have exported all the functions. @6543 maybe another package structs? But I think it's not this PR.

Hmm OK

@codecov-io
Copy link

codecov-io commented Feb 2, 2020

Codecov Report

Merging #10105 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10105      +/-   ##
==========================================
+ Coverage   43.48%   43.48%   +<.01%     
==========================================
  Files         568      568              
  Lines       79112    79113       +1     
==========================================
+ Hits        34404    34406       +2     
  Misses      40461    40461              
+ Partials     4247     4246       -1
Impacted Files Coverage Δ
modules/setting/setting.go 44.07% <0%> (-0.07%) ⬇️
models/unit.go 37.03% <0%> (-2.47%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
routers/repo/view.go 39.13% <0%> (-0.87%) ⬇️
services/pull/check.go 56.64% <0%> (+2.09%) ⬆️
services/pull/temp_repo.go 37.6% <0%> (+5.98%) ⬆️

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 fdd8cbe...dc20594. Read the comment docs.

@lafriks lafriks added this to the 1.12.0 milestone Feb 2, 2020
@lafriks lafriks added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Feb 2, 2020
@techknowlogick techknowlogick merged commit bf1970d into go-gitea:master Feb 2, 2020
@lunny lunny deleted the lunny/refactor_push_update branch February 3, 2020 00:25
return nil, fmt.Errorf("Old and new revisions are both %s", git.EmptySHA)
}
var commits = &repo_module.PushCommits{}
if strings.HasPrefix(opts.RefFullName, git.TagPrefix) {
if opts.IsNewTag() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduced a bug. It should be opts.IsTag(). #10663 will resolve the problem.

@lunny lunny mentioned this pull request Mar 8, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants