Skip to content

Commit b87652f

Browse files
renovate[bot]github-actions[bot]ardatan
authored
fix(deps): update dependency @actions/github to v6 (#2636)
* fix(deps): update dependency @actions/github to v6 * chore(dependencies): updated changesets for modified dependencies * Bump actions * Prettier * Fix tests * Fix build * Fix * Prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Arda TANRIKULU <[email protected]>
1 parent 22311f9 commit b87652f

12 files changed

+175
-89
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-inspector/action': patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@actions/[email protected]`
6+
↗︎](https://www.npmjs.com/package/@actions/github/v/6.0.0) (from `4.0.0`, in `dependencies`)

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = {
66
'example/schemas/schema.js',
77
'example/rules/custom-rule.js',
88
'integration_tests/2027/unused-hotels.js',
9+
'__tests__',
910
],
1011
extends: ['@theguild', '@theguild/eslint-config/json', '@theguild/eslint-config/yml'],
1112
overrides: [

packages/action/__tests__/run.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ describe('Inspector Action', () => {
4040
});
4141

4242
vi.spyOn(github, 'getOctokit').mockReturnValue({
43-
checks: {
44-
create: vi.fn().mockResolvedValue({
45-
data: {
46-
id: '2',
47-
},
48-
}),
43+
rest: {
44+
checks: {
45+
create: vi.fn().mockResolvedValue({
46+
data: {
47+
id: '2',
48+
},
49+
}),
50+
},
4951
},
5052
});
5153
vi.spyOn(github.context, 'repo', 'get').mockImplementation(() => {

packages/action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
},
7373
"dependencies": {
7474
"@actions/core": "1.10.1",
75-
"@actions/github": "4.0.0",
75+
"@actions/github": "6.0.0",
7676
"@graphql-inspector/commands": "workspace:*",
7777
"@graphql-inspector/core": "workspace:*",
7878
"dataloader": "2.2.2",

packages/action/src/checks.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { OctokitInstance } from './types.js';
55
import { batch } from './utils.js';
66

77
type UpdateCheckRunOptions = Required<
8-
Pick<NonNullable<Parameters<OctokitInstance['checks']['update']>[0]>, 'conclusion' | 'output'>
8+
Pick<
9+
NonNullable<Parameters<OctokitInstance['rest']['checks']['update']>[0]>,
10+
'conclusion' | 'output'
11+
>
912
>;
1013

1114
export async function updateCheckRun(
@@ -20,7 +23,7 @@ export async function updateCheckRun(
2023

2124
core.info(`annotations to be sent: ${annotations.length}`);
2225

23-
await octokit.checks.update({
26+
await octokit.rest.checks.update({
2427
check_run_id: checkId,
2528
completed_at: new Date().toISOString(),
2629
status: 'completed',
@@ -35,7 +38,7 @@ export async function updateCheckRun(
3538
try {
3639
await Promise.all(
3740
batches.map(async chunk => {
38-
await octokit.checks.update({
41+
await octokit.rest.checks.update({
3942
check_run_id: checkId,
4043
...github.context.repo,
4144
output: {

packages/action/src/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function fileLoader({
4444
try {
4545
if (result?.repository?.object?.oid && result?.repository?.object?.isTruncated) {
4646
const oid = result?.repository?.object?.oid;
47-
const getBlobResponse = await octokit.git.getBlob({
47+
const getBlobResponse = await octokit.rest.git.getBlob({
4848
owner,
4949
repo,
5050
file_sha: oid,

packages/action/src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function run() {
5252

5353
core.info(`Creating a check named "${checkName}"`);
5454

55-
const check = await octokit.checks.create({
55+
const check = await octokit.rest.checks.create({
5656
owner,
5757
repo,
5858
name: checkName,

pnpm-lock.yaml

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

tsconfig.build.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

tsconfig.json

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"incremental": true,
4-
"baseUrl": ".",
5-
"rootDir": "packages",
6-
"outDir": "dist",
7-
"target": "ES2021",
8-
"module": "esnext",
9-
"moduleResolution": "node",
10-
"resolveJsonModule": true,
11-
"esModuleInterop": true,
12-
"lib": ["ESNext"],
13-
"importHelpers": true,
14-
"preserveConstEnums": true,
15-
"downlevelIteration": true,
16-
"sourceMap": true,
17-
"declaration": true,
18-
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
19-
20-
"strict": true,
21-
"noUnusedLocals": true,
22-
"noUnusedParameters": true,
23-
"skipLibCheck": true,
24-
"types": ["vitest/globals"],
25-
"paths": {
26-
"@graphql-inspector/core": ["packages/core/src/index.ts"],
27-
"@graphql-inspector/logger": ["packages/logger/src/index.ts"],
28-
"@graphql-inspector/ci": ["packages/ci/src/index.ts"],
29-
"@graphql-inspector/cli": ["packages/cli/src/index.ts"],
30-
"@graphql-inspector/config": ["packages/config/src/index.ts"],
31-
"@graphql-inspector/commands": ["packages/commands/commands/src/index.ts"],
32-
"@graphql-inspector/loaders": ["packages/loaders/loaders/src/index.ts"],
33-
"@graphql-inspector/action": ["packages/action/src/index.ts"],
34-
"@graphql-inspector/code-loader": ["packages/loaders/code/src/index.ts"],
35-
"@graphql-inspector/git-loader": ["packages/loaders/git/src/index.ts"],
36-
"@graphql-inspector/github-loader": ["packages/loaders/github/src/index.ts"],
37-
"@graphql-inspector/graphql-loader": ["packages/loaders/graphql/src/index.ts"],
38-
"@graphql-inspector/json-loader": ["packages/loaders/json/src/index.ts"],
39-
"@graphql-inspector/url-loader": ["packages/loaders/url/src/index.ts"],
40-
"@graphql-inspector/diff-command": ["packages/commands/diff/src/index.ts"],
41-
"@graphql-inspector/docs-command": ["packages/commands/docs/src/index.ts"],
42-
"@graphql-inspector/serve-command": ["packages/commands/serve/src/index.ts"],
43-
"@graphql-inspector/coverage-command": ["packages/commands/coverage/src/index.ts"],
44-
"@graphql-inspector/validate-command": ["packages/commands/validate/src/index.ts"],
45-
"@graphql-inspector/introspect-command": ["packages/commands/introspect/src/index.ts"],
46-
"@graphql-inspector/similar-command": ["packages/commands/similar/src/index.ts"],
47-
"@graphql-inspector/testing": ["packages/testing/src/index.ts"]
48-
}
49-
},
50-
"include": ["packages"],
51-
"exclude": ["**/dist", "**/node_modules/**"]
2+
"extends": "./tsconfig.test.json",
3+
"exclude": ["**/dist", "**/node_modules/**", "**/__tests__", "**/tests"]
524
}

0 commit comments

Comments
 (0)