Skip to content

Commit

Permalink
create BIDS base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinsard committed Feb 27, 2024
1 parent 72ecb48 commit be20818
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/dicom_indexer/indexer/index_dicom.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
GITLAB_BOT_USERNAME = os.environ.get("GITLAB_BOT_USERNAME", None)
GITLAB_BOT_EMAIL = os.environ.get("GITLAB_BOT_EMAIL", None)
BIDS_DEV_BRANCH = os.environ.get("BIDS_DEV_BRANCH", "dev")
BIDS_BASE_BRANCH = os.environ.get("BIDS_BASE_BRANCH", "base")
BIDS_CONVERT_BRANCHES = os.environ.get("BIDS_CONVERT_BRANCHES", 'convert/*')
NI_DATAOPS_GITLAB_ROOT = os.environ.get("NI_DATAOPS_GITLAB_ROOT", "ni-dataops")

S3_REMOTE_DEFAULT_PARAMETERS = [
Expand Down Expand Up @@ -335,11 +337,12 @@ def init_bids(
)
bids_project_ds.push(to="origin")
# create dev branch and push for merge requests
bids_project_ds.repo.checkout(BIDS_DEV_BRANCH, ["-b"])
bids_project_ds.push(to="origin")
for branch in [BIDS_DEV_BRANCH, BIDS_BASE_BRANCH]:
bids_project_ds.repo.checkout(branch, ["-b"])
bids_project_ds.push(to="origin")
# set protected branches
bids_project_repo.protectedbranches.create(data={"name": "convert/*"})
bids_project_repo.protectedbranches.create(data={"name": "dev"})
for branch in [BIDS_CONVERT_BRANCHES, BIDS_DEV_BRANCH, BIDS_BASE_BRANCH]:
bids_project_repo.protectedbranches.create(data={"name": branch})

### avoid race conditions for first session pushed ###
### otherwise heudiconv starts before the remotes are configured
Expand Down

0 comments on commit be20818

Please sign in to comment.