Skip to content

Commit 94032e3

Browse files
Bump @octokit/types from 5.5.0 to 6.1.2 (#97)
1 parent 8cbb10c commit 94032e3

4 files changed

Lines changed: 91 additions & 6 deletions

File tree

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 85 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dependencies": {
1515
"@actions/core": "^1.2.6",
1616
"@actions/github": "^4.0.0",
17-
"@octokit/types": "^5.5.0",
17+
"@octokit/types": "^6.1.2",
1818
"globby": "^11.0.1",
1919
"lodash": "^4.17.20"
2020
},

src/commitFiles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import _ from 'lodash';
55
import {computeBlobHashB64String} from './utils/hash';
66

77
export type Octokit = InstanceType<typeof GitHub>;
8-
type Tree = Endpoints['POST /repos/:owner/:repo/git/trees']['parameters']['tree'];
8+
type Tree = Endpoints['POST /repos/{owner}/{repo}/git/trees']['parameters']['tree'];
99

1010
export interface CreateOrUpdateFilesParams {
1111
owner: string;
@@ -35,9 +35,11 @@ export async function createOrUpdateFiles(
3535
} catch (error) {
3636
throw Error(`Could not get base ref ${owner}/${repo}:${ref}: ${error}`);
3737
}
38+
// eslint-disable-next-line @typescript-eslint/naming-convention
3839
const {data: baseCommit} = await octokit.git.getCommit({owner, repo, commit_sha: baseRef.object.sha});
3940
core.debug(`Base ref ${baseRef.ref} is at commit ${baseCommit.sha}`);
4041

42+
// eslint-disable-next-line @typescript-eslint/naming-convention
4143
const {data: baseTree} = await octokit.git.getTree({owner, repo, tree_sha: baseCommit.tree.sha, recursive: 'true'});
4244
core.debug(`Base tree is at ${baseTree.sha}`);
4345

@@ -72,6 +74,7 @@ export async function createOrUpdateFiles(
7274
// Create the new tree
7375
let newTree;
7476
try {
77+
// eslint-disable-next-line @typescript-eslint/naming-convention
7578
const res = await octokit.git.createTree({owner, repo, tree, base_tree: baseTree.sha});
7679
newTree = res.data;
7780
core.debug(`Created new tree at ${newTree.sha}`);

0 commit comments

Comments
 (0)