declastruct-github 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/.test/assets/getSampleGithubContext.d.ts +6 -0
- package/dist/.test/assets/getSampleGithubContext.js +18 -0
- package/dist/.test/assets/getSampleGithubContext.js.map +1 -0
- package/dist/.test/assets/getSampleRepo.d.ts +9 -0
- package/dist/.test/assets/getSampleRepo.js +19 -0
- package/dist/.test/assets/getSampleRepo.js.map +1 -0
- package/dist/access/daos/DeclaredGithubBranchDao.d.ts +10 -0
- package/dist/access/daos/DeclaredGithubBranchDao.js +35 -0
- package/dist/access/daos/DeclaredGithubBranchDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js +34 -0
- package/dist/access/daos/DeclaredGithubBranchProtectionDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubRepoConfigDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js +34 -0
- package/dist/access/daos/DeclaredGithubRepoConfigDao.js.map +1 -0
- package/dist/access/daos/DeclaredGithubRepoDao.d.ts +9 -0
- package/dist/access/daos/DeclaredGithubRepoDao.js +34 -0
- package/dist/access/daos/DeclaredGithubRepoDao.js.map +1 -0
- package/dist/access/sdks/getGithubClient.d.ts +8 -0
- package/dist/access/sdks/getGithubClient.js +22 -0
- package/dist/access/sdks/getGithubClient.js.map +1 -0
- package/dist/contract/sdks/declastruct.acceptance.test.d.ts +1 -0
- package/dist/contract/sdks/declastruct.acceptance.test.js +104 -0
- package/dist/contract/sdks/declastruct.acceptance.test.js.map +1 -0
- package/dist/contract/sdks/index.d.ts +10 -0
- package/dist/contract/sdks/index.js +20 -0
- package/dist/contract/sdks/index.js.map +1 -0
- package/dist/domain.objects/ContextGithubApi.d.ts +9 -0
- package/dist/domain.objects/ContextGithubApi.js +3 -0
- package/dist/domain.objects/ContextGithubApi.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubBranch.d.ts +39 -0
- package/dist/domain.objects/DeclaredGithubBranch.js +12 -0
- package/dist/domain.objects/DeclaredGithubBranch.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubBranchProtection.d.ts +108 -0
- package/dist/domain.objects/DeclaredGithubBranchProtection.js +12 -0
- package/dist/domain.objects/DeclaredGithubBranchProtection.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubRepo.d.ts +57 -0
- package/dist/domain.objects/DeclaredGithubRepo.js +9 -0
- package/dist/domain.objects/DeclaredGithubRepo.js.map +1 -0
- package/dist/domain.objects/DeclaredGithubRepoConfig.d.ts +100 -0
- package/dist/domain.objects/DeclaredGithubRepoConfig.js +12 -0
- package/dist/domain.objects/DeclaredGithubRepoConfig.js.map +1 -0
- package/dist/domain.objects/DeclastructGithubProvider.d.ts +17 -0
- package/dist/domain.objects/DeclastructGithubProvider.js +3 -0
- package/dist/domain.objects/DeclastructGithubProvider.js.map +1 -0
- package/dist/domain.operations/branch/castToDeclaredGithubBranch.d.ts +15 -0
- package/dist/domain.operations/branch/castToDeclaredGithubBranch.js +39 -0
- package/dist/domain.operations/branch/castToDeclaredGithubBranch.js.map +1 -0
- package/dist/domain.operations/branch/getBranch.d.ts +14 -0
- package/dist/domain.operations/branch/getBranch.integration.test.d.ts +1 -0
- package/dist/domain.operations/branch/getBranch.integration.test.js +59 -0
- package/dist/domain.operations/branch/getBranch.integration.test.js.map +1 -0
- package/dist/domain.operations/branch/getBranch.js +50 -0
- package/dist/domain.operations/branch/getBranch.js.map +1 -0
- package/dist/domain.operations/branch/getBranchCommitShaByRepoDefault.d.ts +11 -0
- package/dist/domain.operations/branch/getBranchCommitShaByRepoDefault.js +37 -0
- package/dist/domain.operations/branch/getBranchCommitShaByRepoDefault.js.map +1 -0
- package/dist/domain.operations/branch/getBranches.d.ts +23 -0
- package/dist/domain.operations/branch/getBranches.integration.test.d.ts +1 -0
- package/dist/domain.operations/branch/getBranches.integration.test.js +40 -0
- package/dist/domain.operations/branch/getBranches.integration.test.js.map +1 -0
- package/dist/domain.operations/branch/getBranches.js +33 -0
- package/dist/domain.operations/branch/getBranches.js.map +1 -0
- package/dist/domain.operations/branch/setBranch.d.ts +12 -0
- package/dist/domain.operations/branch/setBranch.integration.test.d.ts +1 -0
- package/dist/domain.operations/branch/setBranch.integration.test.js +65 -0
- package/dist/domain.operations/branch/setBranch.integration.test.js.map +1 -0
- package/dist/domain.operations/branch/setBranch.js +100 -0
- package/dist/domain.operations/branch/setBranch.js.map +1 -0
- package/dist/domain.operations/branch/setBranch.test.d.ts +1 -0
- package/dist/domain.operations/branch/setBranch.test.js +151 -0
- package/dist/domain.operations/branch/setBranch.test.js.map +1 -0
- package/dist/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.d.ts +14 -0
- package/dist/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.js +66 -0
- package/dist/domain.operations/branchProtection/castToDeclaredGithubBranchProtection.js.map +1 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.d.ts +14 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.d.ts +1 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.js +63 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.integration.test.js.map +1 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.js +53 -0
- package/dist/domain.operations/branchProtection/getBranchProtection.js.map +1 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.d.ts +12 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.d.ts +1 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.js +96 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.integration.test.js.map +1 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.js +90 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.js.map +1 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.test.d.ts +1 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.test.js +173 -0
- package/dist/domain.operations/branchProtection/setBranchProtection.test.js.map +1 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.d.ts +11 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.d.ts +1 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.js +212 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.integration.test.js.map +1 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js +44 -0
- package/dist/domain.operations/provider/getDeclastructGithubProvider.js.map +1 -0
- package/dist/domain.operations/repo/castToDeclaredGithubRepo.d.ts +10 -0
- package/dist/domain.operations/repo/castToDeclaredGithubRepo.js +42 -0
- package/dist/domain.operations/repo/castToDeclaredGithubRepo.js.map +1 -0
- package/dist/domain.operations/repo/getRepo.d.ts +14 -0
- package/dist/domain.operations/repo/getRepo.integration.test.d.ts +1 -0
- package/dist/domain.operations/repo/getRepo.integration.test.js +45 -0
- package/dist/domain.operations/repo/getRepo.integration.test.js.map +1 -0
- package/dist/domain.operations/repo/getRepo.js +38 -0
- package/dist/domain.operations/repo/getRepo.js.map +1 -0
- package/dist/domain.operations/repo/getRepos.d.ts +21 -0
- package/dist/domain.operations/repo/getRepos.integration.test.d.ts +1 -0
- package/dist/domain.operations/repo/getRepos.integration.test.js +28 -0
- package/dist/domain.operations/repo/getRepos.integration.test.js.map +1 -0
- package/dist/domain.operations/repo/getRepos.js +41 -0
- package/dist/domain.operations/repo/getRepos.js.map +1 -0
- package/dist/domain.operations/repo/setRepo.d.ts +12 -0
- package/dist/domain.operations/repo/setRepo.integration.test.d.ts +1 -0
- package/dist/domain.operations/repo/setRepo.integration.test.js +29 -0
- package/dist/domain.operations/repo/setRepo.integration.test.js.map +1 -0
- package/dist/domain.operations/repo/setRepo.js +70 -0
- package/dist/domain.operations/repo/setRepo.js.map +1 -0
- package/dist/domain.operations/repo/setRepo.test.d.ts +1 -0
- package/dist/domain.operations/repo/setRepo.test.js +150 -0
- package/dist/domain.operations/repo/setRepo.test.js.map +1 -0
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.d.ts +15 -0
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js +36 -0
- package/dist/domain.operations/repoConfig/castToDeclaredGithubRepoConfig.js.map +1 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.d.ts +14 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.d.ts +1 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.js +55 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.integration.test.js.map +1 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.js +47 -0
- package/dist/domain.operations/repoConfig/getRepoConfig.js.map +1 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.d.ts +12 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.d.ts +1 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.js +87 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.integration.test.js.map +1 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.js +65 -0
- package/dist/domain.operations/repoConfig/setRepoConfig.js.map +1 -0
- package/package.json +104 -0
- package/readme.md +181 -0
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "declastruct-github",
|
|
3
|
+
"author": "ehmpathy",
|
|
4
|
+
"description": "declarative control of GitHub constructs via declastruct - manage repos, branches, and protection rules",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"repository": "ehmpathy/declastruct-github",
|
|
7
|
+
"homepage": "https://github.com/ehmpathy/declastruct-github",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"github",
|
|
10
|
+
"declarative",
|
|
11
|
+
"declastruct",
|
|
12
|
+
"infrastructure-as-code",
|
|
13
|
+
"repository-management",
|
|
14
|
+
"branch-protection",
|
|
15
|
+
"github-api"
|
|
16
|
+
],
|
|
17
|
+
"bugs": "https://github.com/ehmpathy/declastruct-github/issues",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"main": "dist/contract/sdks/index.js",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=8.0.0"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"/dist"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build:ts": "tsc -p ./tsconfig.build.json",
|
|
28
|
+
"commit:with-cli": "npx cz",
|
|
29
|
+
"fix:format:prettier": "prettier --write '**/*.ts' --config ./prettier.config.js",
|
|
30
|
+
"fix:format": "npm run fix:format:prettier",
|
|
31
|
+
"fix:lint": "eslint -c ./.eslintrc.js src/**/*.ts --fix",
|
|
32
|
+
"build:clean": "rm dist/ -rf",
|
|
33
|
+
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
34
|
+
"build": "npm run build:clean && npm run build:compile",
|
|
35
|
+
"test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose",
|
|
36
|
+
"test:types": "tsc -p ./tsconfig.build.json --noEmit",
|
|
37
|
+
"test:format:prettier": "prettier --parser typescript --check 'src/**/*.ts' --config ./prettier.config.js",
|
|
38
|
+
"test:format": "npm run test:format:prettier",
|
|
39
|
+
"test:lint:deps": "npx depcheck -c ./depcheckrc.yml",
|
|
40
|
+
"test:lint:eslint": "eslint -c ./.eslintrc.js src/**/*.ts",
|
|
41
|
+
"test:lint": "npm run test:lint:eslint && npm run test:lint:deps",
|
|
42
|
+
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
43
|
+
"test:integration": "LOCALLY=true jest -c ./jest.integration.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
44
|
+
"test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
45
|
+
"test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally",
|
|
46
|
+
"test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
47
|
+
"prepush": "npm run test && npm run build",
|
|
48
|
+
"prepublish": "npm run build",
|
|
49
|
+
"preversion": "npm run prepush",
|
|
50
|
+
"postversion": "git push origin HEAD --tags --no-verify",
|
|
51
|
+
"postinstall": "[ -d .git ] && npm run prepare:husky || exit 0",
|
|
52
|
+
"prepare:husky": "npx husky install && chmod ug+x .husky/*"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@ehmpathy/uni-time": "1.7.4",
|
|
56
|
+
"@octokit/rest": "^21.0.0",
|
|
57
|
+
"as-procedure": "1.1.1",
|
|
58
|
+
"declastruct": "1.1.5",
|
|
59
|
+
"domain-objects": "0.29.1",
|
|
60
|
+
"helpful-errors": "1.5.3",
|
|
61
|
+
"simple-in-memory-cache": "0.4.0",
|
|
62
|
+
"type-fns": "1.19.0",
|
|
63
|
+
"visualogic": "1.3.2",
|
|
64
|
+
"with-simple-cache": "0.15.1"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@babel/core": "7.28.5",
|
|
68
|
+
"@babel/preset-env": "7.28.5",
|
|
69
|
+
"@commitlint/cli": "19.3.0",
|
|
70
|
+
"@commitlint/config-conventional": "13.1.0",
|
|
71
|
+
"@octokit/types": "13.10.0",
|
|
72
|
+
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
|
73
|
+
"@tsconfig/node-lts-strictest": "18.12.1",
|
|
74
|
+
"@types/jest": "29.2.4",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
76
|
+
"@typescript-eslint/parser": "7.8.0",
|
|
77
|
+
"babel-jest": "30.2.0",
|
|
78
|
+
"core-js": "3.26.1",
|
|
79
|
+
"cz-conventional-changelog": "3.3.0",
|
|
80
|
+
"declapract": "0.12.0",
|
|
81
|
+
"declapract-typescript-ehmpathy": "0.39.5",
|
|
82
|
+
"depcheck": "1.4.3",
|
|
83
|
+
"eslint": "8.56.0",
|
|
84
|
+
"eslint-config-airbnb-typescript": "18.0.0",
|
|
85
|
+
"eslint-config-prettier": "8.5.0",
|
|
86
|
+
"eslint-plugin-import": "2.26.0",
|
|
87
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
88
|
+
"husky": "8.0.3",
|
|
89
|
+
"jest": "29.3.1",
|
|
90
|
+
"prettier": "2.8.1",
|
|
91
|
+
"rhachet": "1.12.1",
|
|
92
|
+
"rhachet-roles-ehmpathy": "1.8.0",
|
|
93
|
+
"simple-log-methods": "0.6.2",
|
|
94
|
+
"test-fns": "1.5.0",
|
|
95
|
+
"ts-jest": "29.4.5",
|
|
96
|
+
"ts-node": "10.9.2",
|
|
97
|
+
"typescript": "5.4.5"
|
|
98
|
+
},
|
|
99
|
+
"config": {
|
|
100
|
+
"commitizen": {
|
|
101
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# declastruct-github
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
Declarative control of Github resource constructs, via [declastruct](https://github.com/ehmpathy/declastruct).
|
|
7
|
+
|
|
8
|
+
Declare the structures you want. Plan to see the changes required. Apply to make it so 🪄
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install -s declastruct-github
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
# use via cli
|
|
18
|
+
|
|
19
|
+
## example.1
|
|
20
|
+
|
|
21
|
+
### wish ✨
|
|
22
|
+
|
|
23
|
+
declare the resources you wish to have - and what state you wish them to be in
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { getDeclastructGithubProvider, DeclaredGithubRepo, DeclaredGithubRepoConfig } from 'declastruct-github';
|
|
27
|
+
|
|
28
|
+
export const getProviders = async () => [
|
|
29
|
+
getDeclastructGithubProvider({
|
|
30
|
+
credentials: {
|
|
31
|
+
token: process.env.GITHUB_TOKEN,
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
export const getResources = async () => {
|
|
37
|
+
const repo = DeclaredGithubRepo.as({
|
|
38
|
+
name: 'super repo',
|
|
39
|
+
});
|
|
40
|
+
const repoConfig = DeclaredGithubRepoConfig.as({
|
|
41
|
+
repo: refByUnique(repo),
|
|
42
|
+
|
|
43
|
+
// for example, only allow squash merges
|
|
44
|
+
allowSquashMerge: true,
|
|
45
|
+
allowMergeCommit: false,
|
|
46
|
+
allowRebaseMerge: false,
|
|
47
|
+
|
|
48
|
+
// ... see the docs or types for other options
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// ... add whatever resources you wish
|
|
52
|
+
|
|
53
|
+
return [
|
|
54
|
+
repo,
|
|
55
|
+
repoConfig,
|
|
56
|
+
// ... all the resources you wish for will go here
|
|
57
|
+
],
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### plan 🔮
|
|
62
|
+
|
|
63
|
+
plan how to achieve the wish of resources you've declared
|
|
64
|
+
|
|
65
|
+
this will emit a plan that declares the changes required in order to fulfill the wish
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npx declastruct plan --wish provision/github/resources.ts --output provision/github/.temp/plan.json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### apply 🪄
|
|
72
|
+
|
|
73
|
+
apply the plan to fulfill the wish
|
|
74
|
+
|
|
75
|
+
this will apply only the changes declared in the plan - and only if this plan is still applicable
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npx declastruct apply --plan provision/github/.temp/plan.json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## example.2
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
export const getResources = async () => {
|
|
86
|
+
// declare the repo
|
|
87
|
+
const repo = DeclaredGithubRepo.as({
|
|
88
|
+
name: "your repo",
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// declare the main branch
|
|
92
|
+
const branchMain = DeclaredGithubBranch.as({
|
|
93
|
+
repo: refByUnique(repo),
|
|
94
|
+
name: 'main',
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
// declare config for the repo
|
|
98
|
+
const repoConfig = DeclaredGithubRepoConfig.as({
|
|
99
|
+
// explicitly set the main branch
|
|
100
|
+
defaultBranch: refByUnique(branchMain),
|
|
101
|
+
|
|
102
|
+
// we only use issues; the rest is noise today
|
|
103
|
+
hasIssues: true,
|
|
104
|
+
hasProjects: false,
|
|
105
|
+
hasWiki: false,
|
|
106
|
+
hasDownloads: false,
|
|
107
|
+
isTemplate: false,
|
|
108
|
+
|
|
109
|
+
// only squash merges are allowed
|
|
110
|
+
allowSquashMerge: true,
|
|
111
|
+
allowMergeCommit: false, // but especially not merge merges. never merge merges
|
|
112
|
+
allowRebaseMerge: false,
|
|
113
|
+
|
|
114
|
+
// always cleanup after yourself
|
|
115
|
+
deleteBranchOnMerge: true,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// declare protection for that branch, too
|
|
119
|
+
const branchMainProtection = DeclaredGithubBranchProtection.as({
|
|
120
|
+
branch: refByUnique(branchMain),
|
|
121
|
+
|
|
122
|
+
enforceAdmins: true, // yes, even admins need to follow this (note: they can still take the time to go and change the settings temporarily for the exceptions)
|
|
123
|
+
allowsDeletions: false, // dont allow the `main` branch to be deleted
|
|
124
|
+
allowsForcePushes: false, // dont allow `main` branch to be force pushed to
|
|
125
|
+
requireLinearHistory: false, // # no ugly merge commits, woo! 🎉
|
|
126
|
+
|
|
127
|
+
requiedStatusChecks: {
|
|
128
|
+
strict: true, // branch must be up to date. otherwise, we dont know if it will really pass once it is merged
|
|
129
|
+
contexts = [
|
|
130
|
+
"suite / install / npm",
|
|
131
|
+
"suite / test-commits",
|
|
132
|
+
"suite / test-types",
|
|
133
|
+
"suite / test-format",
|
|
134
|
+
"suite / test-lint",
|
|
135
|
+
"suite / test-unit",
|
|
136
|
+
"suite / test-integration",
|
|
137
|
+
"suite / test-acceptance-locally",
|
|
138
|
+
"pullreq-title" // "review / pullreq-title",
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
return [
|
|
145
|
+
repo,
|
|
146
|
+
branchMain,
|
|
147
|
+
repoConfig,
|
|
148
|
+
branchMainProtection,
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
# use imperatively
|
|
154
|
+
|
|
155
|
+
## resource=DeclaredGithubRepo
|
|
156
|
+
|
|
157
|
+
### getRepos
|
|
158
|
+
|
|
159
|
+
### getRepo
|
|
160
|
+
|
|
161
|
+
### setRepo
|
|
162
|
+
|
|
163
|
+
## resource=DeclaredGithubBranch
|
|
164
|
+
|
|
165
|
+
### getBranches
|
|
166
|
+
|
|
167
|
+
### getBranch
|
|
168
|
+
|
|
169
|
+
### setBranch
|
|
170
|
+
|
|
171
|
+
## resource=DeclaredGithubRepoConfig
|
|
172
|
+
|
|
173
|
+
### getRepoConfig
|
|
174
|
+
|
|
175
|
+
### setRepoConfig
|
|
176
|
+
|
|
177
|
+
## resource=DeclaredGithubBranchProtection
|
|
178
|
+
|
|
179
|
+
### getBranchProtection
|
|
180
|
+
|
|
181
|
+
### setBranchProtection
|