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 some ui bug about draft release #15137

Merged
merged 19 commits into from
May 6, 2021
Merged

fix some ui bug about draft release #15137

merged 19 commits into from
May 6, 2021

Conversation

a1012112796
Copy link
Member

  • should not show draft release in tag list because
    it will't create real tag
  • still show draft release without tag and commit message
    for draft release instead of 404 error
  • remove tag load for attachement links because it's useless

fix #15058

- should not show draft release in tag list because
  it will't create real tag
- still show draft release without tag and commit message
  for draft release instead of 404 error
- remove tag load for attachement links because it's useless

Signed-off-by: a1012112796 <1012112796@qq.com>
@a1012112796 a1012112796 added type/bug topic/ui Change the appearance of the Gitea UI labels Mar 24, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 25, 2021
@tomaswarynyca
Copy link
Contributor

@a1012112796 Please resolve the conflicts.

@zeripath zeripath added this to the 1.15.0 milestone Apr 15, 2021
@a1012112796
Copy link
Member Author

waiting review

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2021

Codecov Report

Merging #15137 (538c152) into main (eedc0c8) will increase coverage by 0.00%.
The diff coverage is 40.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15137   +/-   ##
=======================================
  Coverage   43.95%   43.96%           
=======================================
  Files         678      678           
  Lines       81903    81908    +5     
=======================================
+ Hits        36000    36010   +10     
  Misses      40027    40027           
+ Partials     5876     5871    -5     
Impacted Files Coverage Δ
routers/repo/release.go 26.58% <30.00%> (+2.19%) ⬆️
modules/context/repo.go 53.12% <33.33%> (-0.20%) ⬇️
routers/routes/web.go 86.47% <100.00%> (ø)
modules/notification/mail/mail.go 38.77% <0.00%> (-3.07%) ⬇️
modules/queue/manager.go 61.36% <0.00%> (-2.85%) ⬇️
modules/process/manager.go 72.83% <0.00%> (-2.47%) ⬇️
routers/api/v1/repo/pull.go 28.14% <0.00%> (-0.60%) ⬇️
models/repo_list.go 77.82% <0.00%> (+0.77%) ⬆️
services/pull/patch.go 55.93% <0.00%> (+1.69%) ⬆️
... and 3 more

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 eedc0c8...538c152. Read the comment docs.

@lunny
Copy link
Member

lunny commented Apr 26, 2021

Could you add some tests?

@a1012112796
Copy link
Member Author

Could you add some tests?

done

@lunny
Copy link
Member

lunny commented Apr 28, 2021

Could you add some tests?

done

CI failed.

That's because has added a new release in relaese test database.
@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

@a1012112796 Doing a review for you today

@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

@a1012112796 Before I dig in, does this get drafts working like Github handles drafts for releases? I noticed just last week that GitHub does it different:

  1. doesn't require a tag
  2. if you do specify a tag it will lock the release to that commit ID even if the target branch head changes (i.e. makes the tag, but hides the release)

@a1012112796
Copy link
Member Author

@a1012112796 Before I dig in, does this get drafts working like Github handles drafts for releases? I noticed just last week that GitHub does it different:

  1. doesn't require a tag
  2. if you do specify a tag it will lock the release to that commit ID even if the target branch head changes (i.e. makes the tag, but hides the release)

yes, in gitea curent design, it willn't create tag in git repository for a draft release. so any link about git tag is not useable for a draft release. and it's also not correct to show draft release on tags list.

@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

@a1012112796 I noticed it still requires a tag if it is a draft. Github doesn't require that to be filled for a draft so that you can go back and tag it later (maybe want to set up the release info but developers/qa might still be trying to get a few more commits in). Is that outside the scope of this PR? #7693

@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

@a1012112796 Wow, already has conflicts again.

@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

For what it's worth, it looks like GitHub still locks the Draft to the commit ID of target at the time the draft is made, assigning a temporary tag to the draft release, and renaming it when the actual release is made, so probably useful in that you don't want the draft tag showing up in the list of tags for the repo.

@richmahn
Copy link
Contributor

richmahn commented May 3, 2021

LGTM, just fix conflicts.

@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 May 3, 2021
@richmahn
Copy link
Contributor

richmahn commented May 5, 2021

@lafriks Needs your approval again.

@6543 6543 merged commit 3088866 into go-gitea:main May 6, 2021
@a1012112796 a1012112796 deleted the bug_fix branch May 6, 2021 09:19
a1012112796 added a commit to a1012112796/gitea that referenced this pull request May 6, 2021
* fix some ui bug about draft release

- should not show draft release in tag list because
  it will't create real tag
- still show draft release without tag and commit message
  for draft release instead of 404 error
- remove tag load for attachement links because it's useless

Signed-off-by: a1012112796 <1012112796@qq.com>

* add test code

* fix test

That's because has added a new release in relaese test database.

* fix dropdown link for draft release
@a1012112796 a1012112796 added the backport/done All backports for this PR have been created label May 6, 2021
6543 pushed a commit that referenced this pull request May 6, 2021
* fix some ui bug about draft release

- should not show draft release in tag list because
  it will't create real tag
- still show draft release without tag and commit message
  for draft release instead of 404 error
- remove tag load for attachement links because it's useless

Signed-off-by: a1012112796 <1012112796@qq.com>

* add test code

* fix test

That's because has added a new release in relaese test database.

* fix dropdown link for draft release
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
* fix some ui bug about draft release

- should not show draft release in tag list because
  it will't create real tag
- still show draft release without tag and commit message
  for draft release instead of 404 error
- remove tag load for attachement links because it's useless

Signed-off-by: a1012112796 <1012112796@qq.com>

* add test code

* fix test

That's because has added a new release in relaese test database.

* fix dropdown link for draft release
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

404 Error on view draft release
9 participants