Skip to content

Commit 346939c

Browse files
committed
chore: update deps
1 parent e46290a commit 346939c

File tree

6 files changed

+2207
-1472
lines changed

6 files changed

+2207
-1472
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ Here is a script that records fixtures and logs them to stdout. Run with `GITHUB
2323

2424
```js
2525
// my-script.js
26-
const { Octokit } = require("@octokit/core");
27-
const createPullRequest = require(".");
28-
const MyOctokit = Octokit.plugin(createPullRequest);
26+
const { Octokit } = require('@octokit/core')
27+
const createPullRequest = require('.')
28+
const MyOctokit = Octokit.plugin(createPullRequest)
2929
const octokit = new MyOctokit({
3030
auth: process.env.GITHUB_TOKEN,
31-
});
31+
})
3232

33-
const fixtures = [];
34-
octokit.hook.after("request", (response, options) => {
33+
const fixtures = []
34+
octokit.hook.after('request', (response, options) => {
3535
fixtures.push({
3636
request: options,
3737
response,
38-
});
39-
});
40-
octokit.hook.error("request", (error, options) => {
38+
})
39+
})
40+
octokit.hook.error('request', (error, options) => {
4141
fixtures.push({
4242
request: options,
4343
response: {
@@ -48,35 +48,35 @@ octokit.hook.error("request", (error, options) => {
4848
documentation_url: error.documentation_url,
4949
},
5050
},
51-
});
51+
})
5252

53-
throw error;
54-
});
53+
throw error
54+
})
5555

5656
octokit
5757
.createPullRequest({
58-
owner: "gr2m",
59-
repo: "sandbox",
60-
title: "One comes, one goes",
61-
body: "because",
62-
head: "test-branch-" + Math.random().toString(36).substr(2, 5),
58+
owner: 'gr2m',
59+
repo: 'sandbox',
60+
title: 'One comes, one goes',
61+
body: 'because',
62+
head: `test-branch-${Math.random().toString(36).substr(2, 5)}`,
6363
changes: {
6464
files: {
65-
"path/to/file1.txt": "Content for file1",
66-
"path/to/file2.txt": "Content for file2",
65+
'path/to/file1.txt': 'Content for file1',
66+
'path/to/file2.txt': 'Content for file2',
6767
},
68-
commit: "why",
68+
commit: 'why',
6969
},
7070
})
7171

7272
.then(() => {
7373
fixtures.forEach((fixture) => {
74-
if (fixture.request.headers.authorization) {
75-
fixture.request.headers.authorization = "token secret";
76-
}
77-
});
78-
console.log(JSON.stringify(fixtures, null, 2));
79-
});
74+
if (fixture.request.headers.authorization)
75+
fixture.request.headers.authorization = 'token secret'
76+
77+
})
78+
console.log(JSON.stringify(fixtures, null, 2))
79+
})
8080
```
8181

8282
[coc]: ./CODE_OF_CONDUCT.md

package.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
"name": "@type-challenges/octokit-create-pull-request",
33
"version": "0.1.8",
44
"description": "Octokit plugin to create a pull request with multiple file changes",
5+
"license": "MIT",
6+
"author": "Gregor Martynus (https://github.com/gr2m)",
7+
"repository": "https://github.com/type-challenges/octokit-create-pull-request",
58
"main": "dist/index.js",
69
"module": "dist/index.mjs",
710
"types": "dist/index.d.ts",
811
"scripts": {
912
"build": "tsup ./src/index.ts --format esm,cjs --dts",
13+
"lint": "eslint .",
1014
"release": "pnpx bumpp patch --tag --commit && pnpm build && npm publish"
1115
},
12-
"author": "Gregor Martynus (https://github.com/gr2m)",
13-
"license": "MIT",
1416
"devDependencies": {
15-
"@antfu/eslint-config-ts": "^0.2.14",
16-
"@octokit/core": "^3.1.1",
17-
"@octokit/plugin-paginate-rest": "^2.3.0",
18-
"@octokit/types": "^5.2.0",
19-
"@types/node": "^14.0.27",
20-
"@typescript-eslint/eslint-plugin": "^3.7.1",
21-
"eslint": "^7.5.0",
22-
"tsup": "^3.4.2",
23-
"typescript": "^3.9.7"
17+
"@antfu/eslint-config": "^0.20.6",
18+
"@octokit/core": "^3.6.0",
19+
"@octokit/plugin-paginate-rest": "^2.17.0",
20+
"@octokit/types": "^6.34.0",
21+
"@types/node": "^17.0.25",
22+
"@typescript-eslint/eslint-plugin": "^5.20.0",
23+
"eslint": "^8.13.0",
24+
"tsup": "^5.12.5",
25+
"typescript": "^4.6.3"
2426
},
25-
"repository": "https://github.com/type-challenges/octokit-create-pull-request",
2627
"eslintConfig": {
27-
"extends": "@antfu/eslint-config-ts"
28+
"extends": "@antfu/eslint-config"
29+
},
30+
"dependencies": {
31+
"@actions/github": "^5.0.1"
2832
}
2933
}

0 commit comments

Comments
 (0)