@openally/github.sdk 1.0.0 → 1.1.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/.all-contributorsrc +16 -16
- package/.editorconfig +13 -13
- package/.github/dependabot.yml +25 -25
- package/.github/workflows/codeql.yml +78 -78
- package/.github/workflows/node.js.yml +52 -52
- package/.github/workflows/publish.yml +29 -29
- package/.github/workflows/scorecards.yml +76 -76
- package/LICENSE +21 -21
- package/README.md +5 -4
- package/SECURITY.md +5 -5
- package/docs/api/ApiEndpoint.md +31 -2
- package/docs/api/GithubClient.md +3 -3
- package/docs/api/fetchRawFile.md +106 -0
- package/docs/api/repos.md +4 -4
- package/docs/api/users.md +3 -3
- package/eslint.config.mjs +3 -3
- package/package.json +2 -2
- package/src/api/rawFile.ts +73 -0
- package/src/api/repos.ts +19 -5
- package/src/api/users.ts +9 -5
- package/src/class/ApiEndpoint.ts +20 -17
- package/src/class/GithubClient.ts +38 -7
- package/src/constants.ts +3 -0
- package/src/index.ts +4 -0
- package/src/types.ts +8 -0
- package/test/ApiEndpoint.spec.ts +63 -2
- package/test/GithubClient.spec.ts +28 -9
- package/test/createApiProxy.spec.ts +4 -4
- package/test/rawFile.spec.ts +382 -0
- package/test/tsconfig.json +11 -0
package/.all-contributorsrc
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [
|
|
3
|
-
"README.md"
|
|
4
|
-
],
|
|
5
|
-
"imageSize": 100,
|
|
6
|
-
"commit": false,
|
|
7
|
-
"contributors": [],
|
|
8
|
-
"contributorsPerLine": 7,
|
|
9
|
-
"projectName": "github.sdk",
|
|
10
|
-
"projectOwner": "OpenAlly",
|
|
11
|
-
"repoType": "github",
|
|
12
|
-
"repoHost": "https://github.com",
|
|
13
|
-
"skipCi": true,
|
|
14
|
-
"commitType": "docs",
|
|
15
|
-
"commitConvention": "angular"
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"README.md"
|
|
4
|
+
],
|
|
5
|
+
"imageSize": 100,
|
|
6
|
+
"commit": false,
|
|
7
|
+
"contributors": [],
|
|
8
|
+
"contributorsPerLine": 7,
|
|
9
|
+
"projectName": "github.sdk",
|
|
10
|
+
"projectOwner": "OpenAlly",
|
|
11
|
+
"repoType": "github",
|
|
12
|
+
"repoHost": "https://github.com",
|
|
13
|
+
"skipCi": true,
|
|
14
|
+
"commitType": "docs",
|
|
15
|
+
"commitConvention": "angular"
|
|
16
|
+
}
|
package/.editorconfig
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Editor configuration, see https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
end_of_line = lf
|
|
11
|
-
|
|
12
|
-
[*.md]
|
|
13
|
-
max_line_length = off
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
|
|
12
|
+
[*.md]
|
|
13
|
+
max_line_length = off
|
|
14
14
|
trim_trailing_whitespace = false
|
package/.github/dependabot.yml
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: github-actions
|
|
4
|
-
directory: /
|
|
5
|
-
schedule:
|
|
6
|
-
interval: monthly
|
|
7
|
-
cooldown:
|
|
8
|
-
default-days: 5
|
|
9
|
-
groups:
|
|
10
|
-
github-actions:
|
|
11
|
-
patterns:
|
|
12
|
-
- "*"
|
|
13
|
-
|
|
14
|
-
- package-ecosystem: npm
|
|
15
|
-
directory: /
|
|
16
|
-
versioning-strategy: widen
|
|
17
|
-
schedule:
|
|
18
|
-
interval: weekly
|
|
19
|
-
cooldown:
|
|
20
|
-
default-days: 5
|
|
21
|
-
groups:
|
|
22
|
-
dependencies:
|
|
23
|
-
dependency-type: "production"
|
|
24
|
-
development-dependencies:
|
|
25
|
-
dependency-type: "development"
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: github-actions
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: monthly
|
|
7
|
+
cooldown:
|
|
8
|
+
default-days: 5
|
|
9
|
+
groups:
|
|
10
|
+
github-actions:
|
|
11
|
+
patterns:
|
|
12
|
+
- "*"
|
|
13
|
+
|
|
14
|
+
- package-ecosystem: npm
|
|
15
|
+
directory: /
|
|
16
|
+
versioning-strategy: widen
|
|
17
|
+
schedule:
|
|
18
|
+
interval: weekly
|
|
19
|
+
cooldown:
|
|
20
|
+
default-days: 5
|
|
21
|
+
groups:
|
|
22
|
+
dependencies:
|
|
23
|
+
dependency-type: "production"
|
|
24
|
+
development-dependencies:
|
|
25
|
+
dependency-type: "development"
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
-
# to commit it to your repository.
|
|
3
|
-
#
|
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
-
# or to provide custom queries or build logic.
|
|
6
|
-
#
|
|
7
|
-
# ******** NOTE ********
|
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
-
# supported CodeQL languages.
|
|
11
|
-
#
|
|
12
|
-
name: "CodeQL"
|
|
13
|
-
|
|
14
|
-
on:
|
|
15
|
-
push:
|
|
16
|
-
branches: ["main"]
|
|
17
|
-
pull_request:
|
|
18
|
-
# The branches below must be a subset of the branches above
|
|
19
|
-
branches: ["main"]
|
|
20
|
-
schedule:
|
|
21
|
-
- cron: "0 0 * * 1"
|
|
22
|
-
|
|
23
|
-
permissions:
|
|
24
|
-
contents: read
|
|
25
|
-
|
|
26
|
-
jobs:
|
|
27
|
-
analyze:
|
|
28
|
-
name: Analyze
|
|
29
|
-
runs-on: ubuntu-latest
|
|
30
|
-
permissions:
|
|
31
|
-
actions: read
|
|
32
|
-
contents: read
|
|
33
|
-
security-events: write
|
|
34
|
-
|
|
35
|
-
strategy:
|
|
36
|
-
fail-fast: false
|
|
37
|
-
matrix:
|
|
38
|
-
language: ["typescript"]
|
|
39
|
-
# CodeQL supports [ $supported-codeql-languages ]
|
|
40
|
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
41
|
-
|
|
42
|
-
steps:
|
|
43
|
-
- name: Harden Runner
|
|
44
|
-
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
45
|
-
with:
|
|
46
|
-
egress-policy: audit
|
|
47
|
-
|
|
48
|
-
- name: Checkout repository
|
|
49
|
-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
50
|
-
|
|
51
|
-
# Initializes the CodeQL tools for scanning.
|
|
52
|
-
- name: Initialize CodeQL
|
|
53
|
-
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
54
|
-
with:
|
|
55
|
-
languages: ${{ matrix.language }}
|
|
56
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
57
|
-
# By default, queries listed here will override any specified in a config file.
|
|
58
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
59
|
-
|
|
60
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
61
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
|
62
|
-
- name: Autobuild
|
|
63
|
-
uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
64
|
-
|
|
65
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
|
66
|
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
67
|
-
|
|
68
|
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
69
|
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
70
|
-
|
|
71
|
-
# - run: |
|
|
72
|
-
# echo "Run, Build Application using script"
|
|
73
|
-
# ./location_of_script_within_repo/buildscript.sh
|
|
74
|
-
|
|
75
|
-
- name: Perform CodeQL Analysis
|
|
76
|
-
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
77
|
-
with:
|
|
78
|
-
category: "/language:${{matrix.language}}"
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: ["main"]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: ["main"]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: "0 0 * * 1"
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
analyze:
|
|
28
|
+
name: Analyze
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
permissions:
|
|
31
|
+
actions: read
|
|
32
|
+
contents: read
|
|
33
|
+
security-events: write
|
|
34
|
+
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
language: ["typescript"]
|
|
39
|
+
# CodeQL supports [ $supported-codeql-languages ]
|
|
40
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Harden Runner
|
|
44
|
+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
45
|
+
with:
|
|
46
|
+
egress-policy: audit
|
|
47
|
+
|
|
48
|
+
- name: Checkout repository
|
|
49
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
50
|
+
|
|
51
|
+
# Initializes the CodeQL tools for scanning.
|
|
52
|
+
- name: Initialize CodeQL
|
|
53
|
+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
54
|
+
with:
|
|
55
|
+
languages: ${{ matrix.language }}
|
|
56
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
57
|
+
# By default, queries listed here will override any specified in a config file.
|
|
58
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
59
|
+
|
|
60
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
61
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
62
|
+
- name: Autobuild
|
|
63
|
+
uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
64
|
+
|
|
65
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
66
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
67
|
+
|
|
68
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
69
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
70
|
+
|
|
71
|
+
# - run: |
|
|
72
|
+
# echo "Run, Build Application using script"
|
|
73
|
+
# ./location_of_script_within_repo/buildscript.sh
|
|
74
|
+
|
|
75
|
+
- name: Perform CodeQL Analysis
|
|
76
|
+
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
77
|
+
with:
|
|
78
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
3
|
-
|
|
4
|
-
name: Node.js CI
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [ "main" ]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [ "main" ]
|
|
11
|
-
|
|
12
|
-
permissions:
|
|
13
|
-
contents: read
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
|
|
20
|
-
strategy:
|
|
21
|
-
matrix:
|
|
22
|
-
node-version: [24.x]
|
|
23
|
-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
24
|
-
|
|
25
|
-
steps:
|
|
26
|
-
- name: Harden Runner
|
|
27
|
-
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
28
|
-
with:
|
|
29
|
-
egress-policy: audit
|
|
30
|
-
|
|
31
|
-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
32
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
33
|
-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
34
|
-
with:
|
|
35
|
-
node-version: ${{ matrix.node-version }}
|
|
36
|
-
- run: npm install --ignore-scripts
|
|
37
|
-
- run: npm run build --if-present
|
|
38
|
-
- run: npm test
|
|
39
|
-
automerge:
|
|
40
|
-
if: >
|
|
41
|
-
github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]'
|
|
42
|
-
needs:
|
|
43
|
-
- build
|
|
44
|
-
runs-on: ubuntu-latest
|
|
45
|
-
permissions:
|
|
46
|
-
contents: write
|
|
47
|
-
pull-requests: write
|
|
48
|
-
steps:
|
|
49
|
-
- name: Merge Dependabot PR
|
|
50
|
-
uses: fastify/github-action-merge-dependabot@1b2ed42db8f9d81a46bac83adedfc03eb5149dff # v3.11.2
|
|
51
|
-
with:
|
|
52
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
1
|
+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
3
|
+
|
|
4
|
+
name: Node.js CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
node-version: [24.x]
|
|
23
|
+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Harden Runner
|
|
27
|
+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
28
|
+
with:
|
|
29
|
+
egress-policy: audit
|
|
30
|
+
|
|
31
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
32
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
33
|
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
34
|
+
with:
|
|
35
|
+
node-version: ${{ matrix.node-version }}
|
|
36
|
+
- run: npm install --ignore-scripts
|
|
37
|
+
- run: npm run build --if-present
|
|
38
|
+
- run: npm test
|
|
39
|
+
automerge:
|
|
40
|
+
if: >
|
|
41
|
+
github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]'
|
|
42
|
+
needs:
|
|
43
|
+
- build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
permissions:
|
|
46
|
+
contents: write
|
|
47
|
+
pull-requests: write
|
|
48
|
+
steps:
|
|
49
|
+
- name: Merge Dependabot PR
|
|
50
|
+
uses: fastify/github-action-merge-dependabot@1b2ed42db8f9d81a46bac83adedfc03eb5149dff # v3.11.2
|
|
51
|
+
with:
|
|
52
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
name: Publish Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- 'v*'
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
id-token: write # Required for OIDC
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
publish:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
17
|
-
|
|
18
|
-
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
19
|
-
with:
|
|
20
|
-
node-version: '24.x'
|
|
21
|
-
registry-url: 'https://registry.npmjs.org'
|
|
22
|
-
|
|
23
|
-
# Ensure npm 11.5.1 or later is installed
|
|
24
|
-
- name: Update npm
|
|
25
|
-
run: npm install -g npm@latest
|
|
26
|
-
- run: npm install --ignore-scripts
|
|
27
|
-
- run: npm run build --if-present
|
|
28
|
-
- run: npm test
|
|
29
|
-
- run: npm publish
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Required for OIDC
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
19
|
+
with:
|
|
20
|
+
node-version: '24.x'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
22
|
+
|
|
23
|
+
# Ensure npm 11.5.1 or later is installed
|
|
24
|
+
- name: Update npm
|
|
25
|
+
run: npm install -g npm@latest
|
|
26
|
+
- run: npm install --ignore-scripts
|
|
27
|
+
- run: npm run build --if-present
|
|
28
|
+
- run: npm test
|
|
29
|
+
- run: npm publish
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub. They are provided
|
|
2
|
-
# by a third-party and are governed by separate terms of service, privacy
|
|
3
|
-
# policy, and support documentation.
|
|
4
|
-
|
|
5
|
-
name: Scorecard supply-chain security
|
|
6
|
-
on:
|
|
7
|
-
# For Branch-Protection check. Only the default branch is supported. See
|
|
8
|
-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
|
9
|
-
branch_protection_rule:
|
|
10
|
-
# To guarantee Maintained check is occasionally updated. See
|
|
11
|
-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
|
12
|
-
schedule:
|
|
13
|
-
- cron: '20 7 * * 2'
|
|
14
|
-
push:
|
|
15
|
-
branches: ["main"]
|
|
16
|
-
|
|
17
|
-
# Declare default permissions as read only.
|
|
18
|
-
permissions: read-all
|
|
19
|
-
|
|
20
|
-
jobs:
|
|
21
|
-
analysis:
|
|
22
|
-
name: Scorecard analysis
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
permissions:
|
|
25
|
-
# Needed to upload the results to code-scanning dashboard.
|
|
26
|
-
security-events: write
|
|
27
|
-
# Needed to publish results and get a badge (see publish_results below).
|
|
28
|
-
id-token: write
|
|
29
|
-
contents: read
|
|
30
|
-
actions: read
|
|
31
|
-
|
|
32
|
-
steps:
|
|
33
|
-
- name: Harden Runner
|
|
34
|
-
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
35
|
-
with:
|
|
36
|
-
egress-policy: audit
|
|
37
|
-
|
|
38
|
-
- name: "Checkout code"
|
|
39
|
-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
40
|
-
with:
|
|
41
|
-
persist-credentials: false
|
|
42
|
-
|
|
43
|
-
- name: "Run analysis"
|
|
44
|
-
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
45
|
-
with:
|
|
46
|
-
results_file: results.sarif
|
|
47
|
-
results_format: sarif
|
|
48
|
-
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
|
49
|
-
# - you want to enable the Branch-Protection check on a *public* repository, or
|
|
50
|
-
# - you are installing Scorecards on a *private* repository
|
|
51
|
-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
|
52
|
-
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
|
53
|
-
|
|
54
|
-
# Public repositories:
|
|
55
|
-
# - Publish results to OpenSSF REST API for easy access by consumers
|
|
56
|
-
# - Allows the repository to include the Scorecard badge.
|
|
57
|
-
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
|
58
|
-
# For private repositories:
|
|
59
|
-
# - `publish_results` will always be set to `false`, regardless
|
|
60
|
-
# of the value entered here.
|
|
61
|
-
publish_results: true
|
|
62
|
-
|
|
63
|
-
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
64
|
-
# format to the repository Actions tab.
|
|
65
|
-
- name: "Upload artifact"
|
|
66
|
-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
67
|
-
with:
|
|
68
|
-
name: SARIF file
|
|
69
|
-
path: results.sarif
|
|
70
|
-
retention-days: 5
|
|
71
|
-
|
|
72
|
-
# Upload the results to GitHub's code scanning dashboard.
|
|
73
|
-
- name: "Upload to code-scanning"
|
|
74
|
-
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
75
|
-
with:
|
|
76
|
-
sarif_file: results.sarif
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub. They are provided
|
|
2
|
+
# by a third-party and are governed by separate terms of service, privacy
|
|
3
|
+
# policy, and support documentation.
|
|
4
|
+
|
|
5
|
+
name: Scorecard supply-chain security
|
|
6
|
+
on:
|
|
7
|
+
# For Branch-Protection check. Only the default branch is supported. See
|
|
8
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
|
9
|
+
branch_protection_rule:
|
|
10
|
+
# To guarantee Maintained check is occasionally updated. See
|
|
11
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: '20 7 * * 2'
|
|
14
|
+
push:
|
|
15
|
+
branches: ["main"]
|
|
16
|
+
|
|
17
|
+
# Declare default permissions as read only.
|
|
18
|
+
permissions: read-all
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
analysis:
|
|
22
|
+
name: Scorecard analysis
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
# Needed to upload the results to code-scanning dashboard.
|
|
26
|
+
security-events: write
|
|
27
|
+
# Needed to publish results and get a badge (see publish_results below).
|
|
28
|
+
id-token: write
|
|
29
|
+
contents: read
|
|
30
|
+
actions: read
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- name: Harden Runner
|
|
34
|
+
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
|
|
35
|
+
with:
|
|
36
|
+
egress-policy: audit
|
|
37
|
+
|
|
38
|
+
- name: "Checkout code"
|
|
39
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
40
|
+
with:
|
|
41
|
+
persist-credentials: false
|
|
42
|
+
|
|
43
|
+
- name: "Run analysis"
|
|
44
|
+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
45
|
+
with:
|
|
46
|
+
results_file: results.sarif
|
|
47
|
+
results_format: sarif
|
|
48
|
+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
|
49
|
+
# - you want to enable the Branch-Protection check on a *public* repository, or
|
|
50
|
+
# - you are installing Scorecards on a *private* repository
|
|
51
|
+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
|
52
|
+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
|
53
|
+
|
|
54
|
+
# Public repositories:
|
|
55
|
+
# - Publish results to OpenSSF REST API for easy access by consumers
|
|
56
|
+
# - Allows the repository to include the Scorecard badge.
|
|
57
|
+
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
|
58
|
+
# For private repositories:
|
|
59
|
+
# - `publish_results` will always be set to `false`, regardless
|
|
60
|
+
# of the value entered here.
|
|
61
|
+
publish_results: true
|
|
62
|
+
|
|
63
|
+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
64
|
+
# format to the repository Actions tab.
|
|
65
|
+
- name: "Upload artifact"
|
|
66
|
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
67
|
+
with:
|
|
68
|
+
name: SARIF file
|
|
69
|
+
path: results.sarif
|
|
70
|
+
retention-days: 5
|
|
71
|
+
|
|
72
|
+
# Upload the results to GitHub's code scanning dashboard.
|
|
73
|
+
- name: "Upload to code-scanning"
|
|
74
|
+
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
|
|
75
|
+
with:
|
|
76
|
+
sarif_file: results.sarif
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 OpenAlly
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenAlly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -47,13 +47,13 @@ const github = new GithubClient({
|
|
|
47
47
|
token: process.env.GITHUB_TOKEN
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
for await (const pr of github.repos.nodejs.node.pulls()
|
|
50
|
+
for await (const pr of github.repos.nodejs.node.pulls()) {
|
|
51
51
|
console.log(pr.title);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const tags = await github.repos.OpenAlly["github.sdk"].tags()
|
|
54
|
+
const tags = await github.repos.OpenAlly["github.sdk"].tags();
|
|
55
55
|
|
|
56
|
-
const userRepos = await github.users.torvalds.repos()
|
|
56
|
+
const userRepos = await github.users.torvalds.repos();
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
## 📚 API
|
|
@@ -61,10 +61,11 @@ const userRepos = await github.users.torvalds.repos().all();
|
|
|
61
61
|
- [ApiEndpoint](./docs/api/ApiEndpoint.md)
|
|
62
62
|
- [GithubClient](./docs/api/GithubClient.md)
|
|
63
63
|
|
|
64
|
-
Available GitHub APIs:
|
|
64
|
+
Available GitHub APIs:
|
|
65
65
|
|
|
66
66
|
- [repos](./docs/api/repos.md)
|
|
67
67
|
- [users](./docs/api/users.md)
|
|
68
|
+
- [fetchRawFile](./docs/api/fetchRawFile.md)
|
|
68
69
|
|
|
69
70
|
---
|
|
70
71
|
|