Skip to content

Hide target selector if tag exists when creating new release#23171

Merged
jolheiser merged 10 commits into
go-gitea:mainfrom
Zettat123:bugfix/issue-22649
Mar 10, 2023
Merged

Hide target selector if tag exists when creating new release#23171
jolheiser merged 10 commits into
go-gitea:mainfrom
Zettat123:bugfix/issue-22649

Conversation

@Zettat123

Copy link
Copy Markdown
Contributor

Close #22649.

status screenshot
empty tag name
new tag
existing tag

@wolfogre wolfogre added the type/enhancement An improvement of existing functionality label Feb 27, 2023
@wolfogre wolfogre added this to the 1.20.0 milestone Feb 27, 2023
Comment thread web_src/js/features/tag-name-editor.js Outdated
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 1, 2023
Comment thread web_src/js/features/tag-name-editor.js Outdated
@Zettat123 Zettat123 force-pushed the bugfix/issue-22649 branch from 2cdff7e to 993d74e Compare March 2, 2023 10:42
@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 Mar 3, 2023
Comment thread templates/repo/release/new.tmpl Outdated
Comment thread web_src/js/index.js Outdated
initUserSettings();
initViewedCheckboxListenerFor();

initTagNameEditor();

@wxiaoguang wxiaoguang Mar 3, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMO we do not need to make more global init calls.

The tag-name-editor only appears on the repository new release page.

So the exiting initRepoReleaseEditor could be refactored to something like:

export function initRepoReleaseNew() {
    const $repoReleaseNew = $('.repository.new.release');
    if (!$repoReleaseNew.length) return;

    // init tag name editor
    // init content editor
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I refactored the initRepoReleaseEditor according to your comment.

Comment thread templates/repo/release/new.tmpl Outdated
@Zettat123 Zettat123 requested a review from silverwind March 6, 2023 02:43
@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 Mar 10, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 10, 2023
@jolheiser

Copy link
Copy Markdown
Member

🎺 🤖

@jolheiser jolheiser merged commit 3de9e63 into go-gitea:main Mar 10, 2023
@jolheiser jolheiser removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 10, 2023
@Zettat123 Zettat123 deleted the bugfix/issue-22649 branch March 13, 2023 02:00
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 13, 2023
* giteaofficial/main:
  Scoped label display and documentation tweaks (go-gitea#23430)
  Deduplicate template code for label selection menu (go-gitea#23431)
  Show edit/close/delete button on organization wide repositories (go-gitea#23388)
  Sync the class change of Edit Column Button to JS code (go-gitea#23400)
  Preserve file size when creating attachments (go-gitea#23406)
  [skip ci] Updated translations via Crowdin
  Use buildkit for docker builds (go-gitea#23415)
  Refactor branch/tag selector dropdown (first step) (go-gitea#23394)
  [skip ci] Updated translations via Crowdin
  Hide target selector if tag exists when creating new release (go-gitea#23171)
  Parse external request id from request headers, and print it in access log (go-gitea#22906)
  Add missing tabs to org projects page (go-gitea#22705)
  Add user webhooks (go-gitea#21563)
  Handle OpenID discovery URL errors a little nicer when creating/editing sources (go-gitea#23397)
  Split CI pipelines (go-gitea#23385)
@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

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release targeting wrong branch after deleting another release with the same tag but different branch

7 participants