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

Closing issues via commit on non-default branch #5957

Closed
s-hamann opened this issue Feb 4, 2019 · 2 comments · Fixed by #5992
Closed

Closing issues via commit on non-default branch #5957

s-hamann opened this issue Feb 4, 2019 · 2 comments · Fixed by #5992
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@s-hamann
Copy link
Contributor

s-hamann commented Feb 4, 2019

  • Gitea version (or commit ref): 1.7.0

Description

While I do understand the reasoning behind #5622 this breaks out workflow here. We keep a stable default (master) branch and do the development on a dev branch. We close issues when they are fixed on the dev branch and use milestones to keep track of what needs to be done before the next release/merge to master.

I believe our development model is not so uncommon that #5622 would not affect a few other teams as well.
Could the auto-closing behaviour somehow be enabled for additional branches, not only for the default branch?

@lafriks
Copy link
Member

lafriks commented Feb 4, 2019

This should probably be added as an option to repository to allow change branch when issues are closed automatically

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Feb 4, 2019
@lunny
Copy link
Member

lunny commented Feb 6, 2019

I added a break label on #5622 and some one could send a pull request to add a config to enable closing issues via commit on non-default branch.

adelowo added a commit to adelowo/gitea that referenced this issue Feb 9, 2019
lafriks pushed a commit that referenced this issue Feb 10, 2019
* fixes #5957

* add tests to make sure config option is respected

* use already defined struct

* - use migration to make the flag repo wide not for the entire gitea instance
Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created

- fix copy/paste error in copyright header year and rearrange import

- use repo config instead of server config value to determine if a commit should close an issue

- update testsuite

* use global config only when creating a new repository

* allow repo admin toggle feature via UI

* fix typo and improve testcase

* fix fixtures

* add DEFAULT prefix to config value

* fix test
@lafriks lafriks added this to the 1.8.0 milestone Feb 10, 2019
@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
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants