|
39 | 39 | description="A small example pipeline used to test new nf-core infrastructure and common code.", # 'repo_description' => 'Description must be set', |
40 | 40 | has_downloads=True, |
41 | 41 | has_issues=True, # 'repo_issues' => 'Enable issues', |
42 | | - has_projects=True, |
| 42 | + has_projects=False, |
43 | 43 | has_wiki=False, # 'repo_wikis' => 'Disable wikis', |
44 | 44 | allow_merge_commit=True, # 'repo_merge_commits' => 'Allow merge commits', |
45 | 45 | allow_rebase_merge=True, # 'repo_merge_rebase' => 'Allow rebase merging', |
|
57 | 57 | ), |
58 | 58 | visibility="public", |
59 | 59 | topics=TOPICS, # 'repo_keywords' => 'Minimum keywords set', |
| 60 | + # NOTE: @mirpedrol asked if we could add missing topics without deleting existing ones |
60 | 61 | ) |
61 | 62 |
|
62 | 63 |
|
63 | | -# Make branches foreach (['master', 'dev', 'TEMPLATE'] as $branch) { |
64 | | -# 'repo_default_branch' => 'default branch master (released) or dev (no releases)', |
| 64 | +# Make branches foreach (['main', 'dev', 'TEMPLATE'] as $branch) { |
| 65 | +# 'repo_default_branch' => 'default branch main (released) or dev (no releases)', |
65 | 66 | # TODO Toggle this on dev as default if there's not release? |
66 | | -# 'branch_master_exists' => 'master branch: branch must exist', |
| 67 | +# 'branch_main_exists' => 'main branch: branch must exist', |
67 | 68 | branch_default_testpipeline = github.BranchDefault( |
68 | 69 | f"branch_default_{NAME}", |
69 | | - branch="master", |
| 70 | + branch="main", |
70 | 71 | repository=NAME, |
71 | 72 | opts=pulumi.ResourceOptions(protect=True), |
72 | 73 | ) |
|
86 | 87 | ) |
87 | 88 | # Add branch protections https://github.com/nf-core/website/blob/33acd6a2fab2bf9251e14212ce731ef3232b5969/public_html/pipeline_health.php#L296 |
88 | 89 | # NOTE This uses the new Rulesets instead of classic branch protection rule |
89 | | -# TODO 'branch_master_strict_updates' => 'master branch: do not require branch to be up to date before merging', |
| 90 | +# TODO 'branch_main_strict_updates' => 'main branch: do not require branch to be up to date before merging', |
90 | 91 | ruleset_branch_default_testpipeline = github.RepositoryRuleset( |
91 | 92 | f"ruleset_branch_default_{NAME}", |
92 | 93 | bypass_actors=[ |
93 | | - # 'branch_master_enforce_admins' => 'master branch: do not enforce rules for admins', |
| 94 | + # 'branch_main_enforce_admins' => 'main branch: do not enforce rules for admins', |
94 | 95 | github.RepositoryRulesetBypassActorArgs( |
95 | 96 | actor_id=CORE_TEAM_ID, |
96 | 97 | actor_type="Team", |
|
104 | 105 | ), |
105 | 106 | ), |
106 | 107 | enforcement="active", |
107 | | - name="master", |
| 108 | + name="main", |
108 | 109 | repository=NAME, |
109 | 110 | rules=github.RepositoryRulesetRulesArgs( |
110 | 111 | deletion=True, |
111 | 112 | non_fast_forward=True, |
112 | 113 | pull_request=github.RepositoryRulesetRulesPullRequestArgs( |
113 | | - required_approving_review_count=2, # 'branch_master_required_num_reviews' => 'master branch: 2 reviews required', |
114 | | - dismiss_stale_reviews_on_push=False, # 'branch_master_stale_reviews' => 'master branch: reviews not marked stale after new commits' |
115 | | - require_code_owner_review=False, # 'branch_master_code_owner_reviews' => 'master branch: code owner reviews not required', |
| 114 | + required_approving_review_count=2, # 'branch_main_required_num_reviews' => 'main branch: 2 reviews required', |
| 115 | + dismiss_stale_reviews_on_push=False, # 'branch_main_stale_reviews' => 'main branch: reviews not marked stale after new commits' |
| 116 | + require_code_owner_review=False, # 'branch_main_code_owner_reviews' => 'main branch: code owner reviews not required', |
116 | 117 | ), |
117 | | - # 'branch_master_required_ci' => 'master branch: minimum set of CI tests must pass', |
| 118 | + # 'branch_main_required_ci' => 'main branch: minimum set of CI tests must pass', |
118 | 119 | required_status_checks=github.RepositoryRulesetRulesRequiredStatusChecksArgs( |
119 | 120 | required_checks=REQUIRED_CI_CHECKS, |
120 | 121 | strict_required_status_checks_policy=True, |
|
178 | 179 | bypass_mode="always", |
179 | 180 | ) |
180 | 181 | # TODO 'branch_template_restrict_push' => 'Restrict push to TEMPLATE to @nf-core-bot', |
| 182 | + # NOTE: @mirpedrol suggested this may not be needed since everyone can run `nf-core sync` manually |
181 | 183 | ], |
182 | 184 | conditions=github.RepositoryRulesetConditionsArgs( |
183 | 185 | ref_name=github.RepositoryRulesetConditionsRefNameArgs( |
|
0 commit comments