#7400 Enable "Prevent creating new branches by git push" for newly created src.fedoraproject.org repositories
Closed: Upstream 4 years ago by pingou. Opened 5 years ago by tibbs.

  • Describe what you need us to do:

The "Prevent creating new branches by git push" option is useful and should be set on new repositories, but there is no API that the repository creation tool could use to set it. I assume that the defaults for the various hooks are stored in some server configuration somewhere. Could this default be flipped so that newly created repositories have that hook configured?

  • When do you need this? (YYYY/MM/DD)

No date

  • When is this no longer needed or useful? (YYYY/MM/DD)

Perhaps when pagure grows an API for setting hooks, and the fedscm-admin tool grows code to talk to it.

  • If we cannot complete your request, what is the impact?

Repositories continue to be created without this useful feature in place, and packagers who want it have to turn it on manually.


It occurs to me that the default would somehow have to be different for forks, and I simply don't know if pagure even has a way to configure the default hooks at all, much less if it can do it differently for forks.

So I suspect that the only real way to do this properly is to wait until pagure has an API to set this hook, and then have the SCM admin tool ticket that hook. But I guess I'll let @pingou or someone who knows pagure internals chime in instead of just closing this.

There are two items for this:

a) write a script to toggle all the existing projects
b) write an API endpoint to toggle git hooks for a project

The first one could be run to toggle this once we have the later in place so new projects could be adjusted by the admins creating them.

Metadata Update from @pingou:
- Issue tagged with: src.fp.o

5 years ago

Metadata Update from @bowlofeggs:
- Issue priority set to: Waiting on Assignee (was: Needs Review)

5 years ago

@pingou whats the status here? I think the options are landed, but we would need to go in and change all the existing repos (possibly in db?)

@kevin no progress on this on either item :(

Pagure 5.9 will come with an API endpoint allowing to toggle API hooks.

We've planned to improve fedscm-admin for this, but at this stage I don't think we want to toggle every existing project out there.
If someone wants to work on it, I'll be happy to help with this. The first step will be to consult the devel list to validate the idea with everyone in the community.

With this, I think we may close this ticket

Open a ticket to fedscm-admin at: https://pagure.io/fedscm-admin/issue/26 to track this RFE.

I'm going to close this ticket as it should be tracked at fedscm-admin now.

Metadata Update from @pingou:
- Issue close_status updated to: Upstream
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata