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

Fix checks in PR for empty commits #19603 #20290

Merged
merged 9 commits into from
Jul 13, 2022

Conversation

jedi7
Copy link
Contributor

@jedi7 jedi7 commented Jul 8, 2022

@Gusted Gusted added this to the 1.18.0 milestone Jul 10, 2022
* Fixes issue go-gitea#19603
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* basd on zeripath patch
@jedi7 jedi7 force-pushed the bugfix/zeripath_metacommit_merging branch from 7c2d005 to d686e09 Compare July 10, 2022 14:15
@zeripath
Copy link
Contributor

OK so the problem with the initial patch is that pr.HeadCommitID is only set in some limited circumstances and we're going to have to create a new PR status.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 11, 2022
services/pull/check.go Outdated Show resolved Hide resolved
@jedi7
Copy link
Contributor Author

jedi7 commented Jul 12, 2022

is there way to restart build? Seems it was killed.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 12, 2022
@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 Jul 13, 2022
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

LGTM

services/pull/patch.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@b7c6ec9). Click here to learn what that means.
The diff coverage is 60.00%.

❗ Current head 8e44c6e differs from pull request most recent head d3d1b45. Consider uploading reports for the commit d3d1b45 to get more accurate results

@@           Coverage Diff           @@
##             main   #20290   +/-   ##
=======================================
  Coverage        ?   46.94%           
=======================================
  Files           ?      976           
  Lines           ?   135031           
  Branches        ?        0           
=======================================
  Hits            ?    63390           
  Misses          ?    63881           
  Partials        ?     7760           
Impacted Files Coverage Δ
services/pull/check.go 27.95% <0.00%> (ø)
services/pull/patch.go 55.39% <57.14%> (ø)
models/issues/pull.go 52.04% <100.00%> (ø)

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 b7c6ec9...d3d1b45. Read the comment docs.

@wxiaoguang wxiaoguang merged commit 8420c1b into go-gitea:main Jul 13, 2022
@jedi7
Copy link
Contributor Author

jedi7 commented Jul 13, 2022

Thanks. Will be possible to get it into ver 1.17 ? Or is too late? The release 1.18 will be after 6 months, right?

@wxiaoguang
Copy link
Contributor

I think it's fine to backport to 1.17, can you send a backport? I will vote a LGTM.

@jedi7
Copy link
Contributor Author

jedi7 commented Jul 13, 2022

@wxiaoguang What are proper steps please? PR against the branch release/1.17 ?

@wxiaoguang
Copy link
Contributor

Yup. Here is a document for reference: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#backports-and-frontports

Personally I sometimes just checkout the old (1.17) branch , create a new branch for backport and cherry-pick the commit from main branch (manually). If there are not too many conflicts, it will be easy. If there are a lot of conflicts: (either) give up the backport if the backport is not important (or) fix the backport carefully if the backport is very important.

@6543 6543 added backport/done All backports for this PR have been created backport/v1.17 labels Jul 13, 2022
zeripath added a commit that referenced this pull request Jul 13, 2022
Backport #20290

* Fix #19603
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging


Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Andrew Thornton <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 14, 2022
* giteaofficial/main:
  Fix icon margin in user/settings/repos (go-gitea#20281)
  Fix org label open count, including close count issue (go-gitea#20353)
  [skip ci] Updated translations via Crowdin
  Prevent context deadline error propagation in GetCommitsInfo (go-gitea#20346)
  Add missing return for when topic isn't found (go-gitea#20351)
  Upgrade to Node 18 on CI (go-gitea#20340)
  Fix checks in PR for empty commits go-gitea#19603 (go-gitea#20290)
  Use default values when provided values are empty (go-gitea#20318)
  Add tests for the host checking logic, clarify the behaviors (go-gitea#20328)
  Changelog for 1.16.9 (update) (go-gitea#20341) (go-gitea#20343)
  Fix various typos (go-gitea#20338)
  Correctly handle draft releases without a tag (go-gitea#20314)
  Add write check for creating Commit status (go-gitea#20332)
  Remove blue text on migrate page (go-gitea#20273)
  Updated dead link to Madeleine.js source (go-gitea#20322)
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 10, 2022
* Fixes issue go-gitea#19603 (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in go-gitea#19738
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants