@theholocron/github-client 1.29.0 → 1.30.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/dist/index.d.mts +1 -1
- package/dist/index.mjs +9 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -392,7 +392,7 @@ declare function createGitHubClient(opts: GitHubClientOptions): {
|
|
|
392
392
|
getRef: (repo: string, branch: string) => Promise<GitRef>;
|
|
393
393
|
getCommit: (repo: string, sha: string) => Promise<GitCommit>;
|
|
394
394
|
getTree: (repo: string, sha: string, recursive?: boolean) => Promise<GitTree>;
|
|
395
|
-
getContents: (repo: string, path: string) => Promise<GitContents>;
|
|
395
|
+
getContents: (repo: string, path: string, ref?: string) => Promise<GitContents>;
|
|
396
396
|
createBlob: (repo: string, content: string, encoding?: string) => Promise<GitBlob>;
|
|
397
397
|
createTree: (repo: string, tree: Array<{
|
|
398
398
|
path: string;
|
package/dist/index.mjs
CHANGED
|
@@ -65,7 +65,15 @@ function git(rest) {
|
|
|
65
65
|
getRef: (repo, branch) => rest.request(`${repoBase(repo)}/git/ref/heads/${branch}`),
|
|
66
66
|
getCommit: (repo, sha) => rest.request(`${repoBase(repo)}/git/commits/${sha}`),
|
|
67
67
|
getTree: (repo, sha, recursive = false) => rest.request(`${repoBase(repo)}/git/trees/${sha}${recursive ? "?recursive=1" : ""}`),
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* `ref` defaults to the repo's default branch (GitHub's own default)
|
|
70
|
+
* when omitted — the security-relevant choice every existing caller
|
|
71
|
+
* relies on (D4/D6, `validateConfig()`'s own docstring). Pass it
|
|
72
|
+
* explicitly to read a specific commit/branch's content instead — a
|
|
73
|
+
* same-repo PR branch is no longer a new trust boundary for this org
|
|
74
|
+
* (D6-amended, `tech-sentinel-ci-runner.spec.md`), just never a fork's.
|
|
75
|
+
*/
|
|
76
|
+
getContents: (repo, path, ref) => rest.request(`${repoBase(repo)}/contents/${path}`, ref ? { query: { ref } } : void 0),
|
|
69
77
|
createBlob: (repo, content, encoding = "utf-8") => rest.request(`${repoBase(repo)}/git/blobs`, {
|
|
70
78
|
method: "POST",
|
|
71
79
|
body: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/github-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "A TypeScript client for the GitHub REST API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@theholocron/observability": "^0.3.0",
|
|
36
|
-
"@theholocron/http-client": "^1.
|
|
36
|
+
"@theholocron/http-client": "^1.30.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@theholocron/cli": "5.0.0-alpha.33",
|