SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit af157eaf authored by George Katsikas's avatar George Katsikas :goat:
Browse files

modify proofs repo branch to allow dev pushing

parent 0bb94c2e
No related branches found
No related tags found
1 merge request!52New Production page fixes and oversights
......@@ -13,6 +13,7 @@ from common.utils import get_current_domain
from gitlab import Gitlab
from gitlab.v4.objects import Group, Project
from gitlab.exceptions import GitlabGetError
from gitlab.const import AccessLevel
import arxiv
import requests
......@@ -197,6 +198,19 @@ class Command(BaseCommand):
}
)
# Allow Developers to push to the protected "main" branch
# Protected branches lay on top of the branches. Deleting and recreating them is
# the only way to change their settings and does not affect the branches themselves
project.protectedbranches.delete("main")
project.protectedbranches.create(
{
"name": "main",
"merge_access_level": AccessLevel.MAINTAINER,
"push_access_level": AccessLevel.DEVELOPER,
"allow_force_push": False,
}
)
self.stdout.write(
self.style.SUCCESS(f"Copied pure templates to {repo.git_path}")
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment