Skip to content

Commit bd199e9

Browse files
committed
chore: Add two different ways of tackling this
1. Importing them all by hand, some code duplication and effort, but probably the least likely to blow up 2. Looping through them all We can also start with 1, and then move to 2 once everything is captured in the Pulumi state with 1(which seems like the sane option)
1 parent 33c8a50 commit bd199e9

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

Diff for: pulumi/github/repos/core/modules.py

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import yaml
2+
3+
import pulumi
4+
import pulumi_github as github
5+
6+
7+
nf_core_tf = github.Repository(
8+
"nf-core-tf",
9+
allow_merge_commit=False,
10+
allow_rebase_merge=False,
11+
allow_squash_merge=False,
12+
default_branch="master",
13+
description="Repository to host tool-specific module files for the Nextflow DSL2 community!",
14+
has_downloads=True,
15+
has_issues=True,
16+
has_projects=True,
17+
homepage_url="https://nf-co.re",
18+
merge_commit_message="",
19+
merge_commit_title="",
20+
name="modules",
21+
security_and_analysis=github.RepositorySecurityAndAnalysisArgs(
22+
secret_scanning=github.RepositorySecurityAndAnalysisSecretScanningArgs(
23+
status="disabled",
24+
),
25+
secret_scanning_push_protection=github.RepositorySecurityAndAnalysisSecretScanningPushProtectionArgs(
26+
status="disabled",
27+
),
28+
),
29+
squash_merge_commit_message="",
30+
squash_merge_commit_title="",
31+
topics=[
32+
"nextflow",
33+
"pipelines",
34+
"nf-test",
35+
"modules",
36+
"nf-core",
37+
"dsl2",
38+
"workflows",
39+
],
40+
visibility="public",
41+
opts=pulumi.ResourceOptions(protect=True),
42+
)

Diff for: pulumi/github/repos/import_by_hand.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
3+
import yaml
4+
5+
import pulumi
6+
import pulumi_github as github
7+
8+
import pipelines.denovotranscript
9+
import pipelines.meerpipe
10+
import pipelines.pairgenomealign
11+
import pipelines.phaseimpute
12+
import pipelines.reportho
13+
14+
# ...
15+
16+
import core.github
17+
import core.modules
18+
19+
# ...
20+
import core.website

Diff for: pulumi/github/repos/loop_example.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env python
2+
3+
import yaml
4+
5+
import pulumi
6+
import pulumi_github as github
7+
8+
TOPICS = [
9+
"nextflow",
10+
"pipelines",
11+
"nf-test",
12+
"modules",
13+
"nf-core",
14+
"dsl2",
15+
"workflows",
16+
]
17+
18+
alpha_test_pipeline_repos = [
19+
"denovotranscript",
20+
"meerpipe",
21+
"pairgenomealign",
22+
"phaseimpute",
23+
"reportho",
24+
]
25+
26+
for pipeline in alpha_test_pipeline_repos:
27+
github.Repository(
28+
"nf-core-tf",
29+
allow_merge_commit=True,
30+
allow_rebase_merge=True,
31+
allow_squash_merge=True,
32+
default_branch="master",
33+
description="Alpha test repository for nf-core",
34+
has_downloads=True,
35+
has_issues=True,
36+
has_projects=True,
37+
homepage_url=f"https://nf-co.re/{pipeline}",
38+
merge_commit_message="",
39+
merge_commit_title="",
40+
name=pipeline,
41+
security_and_analysis=github.RepositorySecurityAndAnalysisArgs(
42+
secret_scanning=github.RepositorySecurityAndAnalysisSecretScanningArgs(
43+
status="disabled",
44+
),
45+
secret_scanning_push_protection=github.RepositorySecurityAndAnalysisSecretScanningPushProtectionArgs(
46+
status="disabled",
47+
),
48+
),
49+
squash_merge_commit_message="",
50+
squash_merge_commit_title="",
51+
topics=TOPICS,
52+
visibility="public",
53+
# NOTE Idk if this will work
54+
opts=pulumi.ResourceOptions(protect=True),
55+
)

0 commit comments

Comments
 (0)