Skip to content

Commit 929d181

Browse files
edmundmillermashehumirpedrol
committed
fix: Address PR Review comments
Co-authored-by: mashehu <[email protected]> Co-authored-by: mirpedrol <[email protected]>
1 parent cc47fb9 commit 929d181

File tree

4 files changed

+19
-70
lines changed

4 files changed

+19
-70
lines changed

.github/workflows/repos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
- main
66
paths:
77
- "pulumi/github/repos/**/*"
8+
workflow_dispatch:
89
pull_request:
910
branches:
1011
- main
@@ -47,16 +48,15 @@ jobs:
4748
working-directory: ${{ env.PULUMI_WORKING_DIRECTORY }}
4849

4950
- name: PR previews
50-
if: ${{ github.event_name == 'pull_request' }}
51-
uses: pulumi/actions@v3
51+
uses: pulumi/actions@v6
5252
with:
5353
command: preview
5454
stack-name: ${{ env.PULUMI_STACK_NAME }}
5555
work-dir: ${{ env.PULUMI_WORKING_DIRECTORY }}
5656

5757
- name: Apply infrastructure update
5858
if: ${{ github.event_name == 'push' }}
59-
uses: pulumi/actions@v3
59+
uses: pulumi/actions@v6
6060
with:
6161
command: up
6262
stack-name: ${{ env.PULUMI_STACK_NAME }}

pulumi/github/repos/core/modules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
allow_merge_commit=False,
1010
allow_rebase_merge=False,
1111
allow_squash_merge=False,
12-
default_branch="master",
12+
default_branch="main",
1313
description="Repository to host tool-specific module files for the Nextflow DSL2 community!",
1414
has_downloads=True,
1515
has_issues=True,
16-
has_projects=True,
16+
has_projects=False,
1717
homepage_url="https://nf-co.re",
1818
merge_commit_message="",
1919
merge_commit_title="",

pulumi/github/repos/loop_example.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

pulumi/github/repos/pipelines/testpipeline.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
description="A small example pipeline used to test new nf-core infrastructure and common code.", # 'repo_description' => 'Description must be set',
4040
has_downloads=True,
4141
has_issues=True, # 'repo_issues' => 'Enable issues',
42-
has_projects=True,
42+
has_projects=False,
4343
has_wiki=False, # 'repo_wikis' => 'Disable wikis',
4444
allow_merge_commit=True, # 'repo_merge_commits' => 'Allow merge commits',
4545
allow_rebase_merge=True, # 'repo_merge_rebase' => 'Allow rebase merging',
@@ -57,16 +57,17 @@
5757
),
5858
visibility="public",
5959
topics=TOPICS, # 'repo_keywords' => 'Minimum keywords set',
60+
# NOTE: @mirpedrol asked if we could add missing topics without deleting existing ones
6061
)
6162

6263

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)',
6566
# 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',
6768
branch_default_testpipeline = github.BranchDefault(
6869
f"branch_default_{NAME}",
69-
branch="master",
70+
branch="main",
7071
repository=NAME,
7172
opts=pulumi.ResourceOptions(protect=True),
7273
)
@@ -86,11 +87,11 @@
8687
)
8788
# Add branch protections https://github.com/nf-core/website/blob/33acd6a2fab2bf9251e14212ce731ef3232b5969/public_html/pipeline_health.php#L296
8889
# 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',
9091
ruleset_branch_default_testpipeline = github.RepositoryRuleset(
9192
f"ruleset_branch_default_{NAME}",
9293
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',
9495
github.RepositoryRulesetBypassActorArgs(
9596
actor_id=CORE_TEAM_ID,
9697
actor_type="Team",
@@ -104,17 +105,17 @@
104105
),
105106
),
106107
enforcement="active",
107-
name="master",
108+
name="main",
108109
repository=NAME,
109110
rules=github.RepositoryRulesetRulesArgs(
110111
deletion=True,
111112
non_fast_forward=True,
112113
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',
116117
),
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',
118119
required_status_checks=github.RepositoryRulesetRulesRequiredStatusChecksArgs(
119120
required_checks=REQUIRED_CI_CHECKS,
120121
strict_required_status_checks_policy=True,
@@ -178,6 +179,7 @@
178179
bypass_mode="always",
179180
)
180181
# 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
181183
],
182184
conditions=github.RepositoryRulesetConditionsArgs(
183185
ref_name=github.RepositoryRulesetConditionsRefNameArgs(

0 commit comments

Comments
 (0)