@graphql-inspector/github
Advanced tools
Comparing version 4.0.2-alpha-20230723093647-d1404a7d to 4.0.2-alpha-20230723111821-90ebc400
@@ -10,4 +10,6 @@ "use strict"; | ||
const { onError, release } = (0, diagnostics_js_1.getDiagnostics)(app); | ||
console.log("app", app); | ||
function wrap(runner) { | ||
return async (ctx) => { | ||
console.log("ctx", ctx); | ||
try { | ||
@@ -24,5 +26,10 @@ await runner(ctx); | ||
const ref = context.payload.check_run.head_sha; | ||
console.log("ref", ref); | ||
const { owner, repo } = context.repo(); | ||
console.log("owner", owner); | ||
console.log("repo", repo); | ||
const action = context.payload.action; | ||
console.log("action", action); | ||
const pullRequests = context.payload.check_run.pull_requests; | ||
console.log("pullRequests", pullRequests); | ||
const before = context.payload.check_run.check_suite.before; | ||
@@ -40,3 +47,5 @@ const fullAction = 'check_run.' + action; | ||
}); | ||
console.log("loadFile", loadFile); | ||
const loadConfig = (0, loaders_js_1.createConfigLoader)({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
console.log("loadConfig", loadConfig); | ||
await (0, schema_diff_js_1.handleSchemaDiff)({ | ||
@@ -88,2 +97,36 @@ release, | ||
})); | ||
app.on('pull_request.synchronize', wrap(async (context) => { | ||
const ref = context.payload.pull_request.head.sha; | ||
const pullRequestNumber = context.payload.pull_request.number; | ||
const { owner, repo } = context.repo(); | ||
const action = context.payload.action; | ||
const pullRequests = [context.payload.pull_request]; | ||
const before = context.payload.pull_request.base.sha; | ||
const fullAction = 'pull_request.' + action; | ||
if (['opened', 'synchronize', 'edited', 'labeled', 'unlabeled'].includes(action) === false) { | ||
return; | ||
} | ||
const loadFile = (0, loaders_js_1.createFileLoader)({ | ||
context, | ||
owner, | ||
repo, | ||
release, | ||
action: fullAction, | ||
}); | ||
const loadConfig = (0, loaders_js_1.createConfigLoader)({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
await (0, schema_diff_js_1.handleSchemaDiff)({ | ||
release, | ||
action: fullAction, | ||
context, | ||
ref, | ||
repo, | ||
owner, | ||
loadFile, | ||
loadConfig, | ||
before, | ||
pullRequests, | ||
pullRequestNumber, | ||
onError, | ||
}); | ||
})); | ||
app.on('pull_request', wrap(async (context) => { | ||
@@ -90,0 +133,0 @@ const ref = context.payload.pull_request.head.sha; |
@@ -10,4 +10,6 @@ "use strict"; | ||
const { onError, release } = (0, diagnostics_js_1.getDiagnostics)(app); | ||
console.log("app", app); | ||
function wrap(runner) { | ||
return async (ctx) => { | ||
console.log("ctx", ctx); | ||
try { | ||
@@ -24,5 +26,10 @@ await runner(ctx); | ||
const ref = context.payload.check_run.head_sha; | ||
console.log("ref", ref); | ||
const { owner, repo } = context.repo(); | ||
console.log("owner", owner); | ||
console.log("repo", repo); | ||
const action = context.payload.action; | ||
console.log("action", action); | ||
const pullRequests = context.payload.check_run.pull_requests; | ||
console.log("pullRequests", pullRequests); | ||
const before = context.payload.check_run.check_suite.before; | ||
@@ -40,3 +47,5 @@ const fullAction = 'check_run.' + action; | ||
}); | ||
console.log("loadFile", loadFile); | ||
const loadConfig = (0, loaders_js_1.createConfigLoader)({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
console.log("loadConfig", loadConfig); | ||
await (0, schema_diff_js_1.handleSchemaDiff)({ | ||
@@ -88,2 +97,36 @@ release, | ||
})); | ||
app.on('pull_request.synchronize', wrap(async (context) => { | ||
const ref = context.payload.pull_request.head.sha; | ||
const pullRequestNumber = context.payload.pull_request.number; | ||
const { owner, repo } = context.repo(); | ||
const action = context.payload.action; | ||
const pullRequests = [context.payload.pull_request]; | ||
const before = context.payload.pull_request.base.sha; | ||
const fullAction = 'pull_request.' + action; | ||
if (['opened', 'synchronize', 'edited', 'labeled', 'unlabeled'].includes(action) === false) { | ||
return; | ||
} | ||
const loadFile = (0, loaders_js_1.createFileLoader)({ | ||
context, | ||
owner, | ||
repo, | ||
release, | ||
action: fullAction, | ||
}); | ||
const loadConfig = (0, loaders_js_1.createConfigLoader)({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
await (0, schema_diff_js_1.handleSchemaDiff)({ | ||
release, | ||
action: fullAction, | ||
context, | ||
ref, | ||
repo, | ||
owner, | ||
loadFile, | ||
loadConfig, | ||
before, | ||
pullRequests, | ||
pullRequestNumber, | ||
onError, | ||
}); | ||
})); | ||
app.on('pull_request', wrap(async (context) => { | ||
@@ -90,0 +133,0 @@ const ref = context.payload.pull_request.head.sha; |
@@ -42,2 +42,3 @@ "use strict"; | ||
}; | ||
console.log("oldPointer", oldPointer); | ||
const newPointer = { | ||
@@ -47,2 +48,3 @@ path: config.schema, | ||
}; | ||
console.log("newPointer", newPointer); | ||
const sources = await (0, loaders_js_1.loadSources)({ | ||
@@ -54,2 +56,3 @@ config, | ||
}); | ||
console.log("sources", sources); | ||
const schemas = { | ||
@@ -65,2 +68,3 @@ old: (0, graphql_1.buildSchema)(sources.old, { | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -84,2 +88,3 @@ const changes = await (0, core_1.diff)(schemas.old, schemas.new); | ||
const actions = []; | ||
console.log("actions", actions); | ||
let commit; | ||
@@ -109,2 +114,3 @@ if ("commits" in payload) { | ||
} | ||
console.log("notifications", notifications.webhook); | ||
if (notifications.webhook) { | ||
@@ -111,0 +117,0 @@ actions.push(actionRunner('webhook', () => (0, notifications_js_1.notifyWithWebhook)({ |
@@ -25,2 +25,3 @@ "use strict"; | ||
}); | ||
console.log("checkRunId", checkRunId); | ||
try { | ||
@@ -101,2 +102,3 @@ logger.info(`Looking for config`); | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -108,2 +110,3 @@ const action = await (0, diff_js_1.diff)({ | ||
}); | ||
console.log("action", action); | ||
logger.info(`schema diff result is ready`); | ||
@@ -110,0 +113,0 @@ let conclusion = action.conclusion; |
@@ -42,2 +42,3 @@ "use strict"; | ||
}; | ||
console.log("oldPointer", oldPointer); | ||
const newPointer = { | ||
@@ -47,2 +48,3 @@ path: config.schema, | ||
}; | ||
console.log("newPointer", newPointer); | ||
const sources = await (0, loaders_js_1.loadSources)({ | ||
@@ -54,2 +56,3 @@ config, | ||
}); | ||
console.log("sources", sources); | ||
const schemas = { | ||
@@ -65,2 +68,3 @@ old: (0, graphql_1.buildSchema)(sources.old, { | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -84,2 +88,3 @@ const changes = await (0, core_1.diff)(schemas.old, schemas.new); | ||
const actions = []; | ||
console.log("actions", actions); | ||
let commit; | ||
@@ -109,2 +114,3 @@ if ("commits" in payload) { | ||
} | ||
console.log("notifications", notifications.webhook); | ||
if (notifications.webhook) { | ||
@@ -111,0 +117,0 @@ actions.push(actionRunner('webhook', () => (0, notifications_js_1.notifyWithWebhook)({ |
@@ -25,2 +25,3 @@ "use strict"; | ||
}); | ||
console.log("checkRunId", checkRunId); | ||
try { | ||
@@ -101,2 +102,3 @@ logger.info(`Looking for config`); | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -108,2 +110,3 @@ const action = await (0, diff_js_1.diff)({ | ||
}); | ||
console.log("action", action); | ||
logger.info(`schema diff result is ready`); | ||
@@ -110,0 +113,0 @@ let conclusion = action.conclusion; |
@@ -8,4 +8,6 @@ import { getDiagnostics } from './helpers/diagnostics.js'; | ||
const { onError, release } = getDiagnostics(app); | ||
console.log("app", app); | ||
function wrap(runner) { | ||
return async (ctx) => { | ||
console.log("ctx", ctx); | ||
try { | ||
@@ -22,5 +24,10 @@ await runner(ctx); | ||
const ref = context.payload.check_run.head_sha; | ||
console.log("ref", ref); | ||
const { owner, repo } = context.repo(); | ||
console.log("owner", owner); | ||
console.log("repo", repo); | ||
const action = context.payload.action; | ||
console.log("action", action); | ||
const pullRequests = context.payload.check_run.pull_requests; | ||
console.log("pullRequests", pullRequests); | ||
const before = context.payload.check_run.check_suite.before; | ||
@@ -38,3 +45,5 @@ const fullAction = 'check_run.' + action; | ||
}); | ||
console.log("loadFile", loadFile); | ||
const loadConfig = createConfigLoader({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
console.log("loadConfig", loadConfig); | ||
await handleSchemaDiff({ | ||
@@ -86,2 +95,36 @@ release, | ||
})); | ||
app.on('pull_request.synchronize', wrap(async (context) => { | ||
const ref = context.payload.pull_request.head.sha; | ||
const pullRequestNumber = context.payload.pull_request.number; | ||
const { owner, repo } = context.repo(); | ||
const action = context.payload.action; | ||
const pullRequests = [context.payload.pull_request]; | ||
const before = context.payload.pull_request.base.sha; | ||
const fullAction = 'pull_request.' + action; | ||
if (['opened', 'synchronize', 'edited', 'labeled', 'unlabeled'].includes(action) === false) { | ||
return; | ||
} | ||
const loadFile = createFileLoader({ | ||
context, | ||
owner, | ||
repo, | ||
release, | ||
action: fullAction, | ||
}); | ||
const loadConfig = createConfigLoader({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
await handleSchemaDiff({ | ||
release, | ||
action: fullAction, | ||
context, | ||
ref, | ||
repo, | ||
owner, | ||
loadFile, | ||
loadConfig, | ||
before, | ||
pullRequests, | ||
pullRequestNumber, | ||
onError, | ||
}); | ||
})); | ||
app.on('pull_request', wrap(async (context) => { | ||
@@ -88,0 +131,0 @@ const ref = context.payload.pull_request.head.sha; |
@@ -8,4 +8,6 @@ import { getDiagnostics } from './helpers/diagnostics.js'; | ||
const { onError, release } = getDiagnostics(app); | ||
console.log("app", app); | ||
function wrap(runner) { | ||
return async (ctx) => { | ||
console.log("ctx", ctx); | ||
try { | ||
@@ -22,5 +24,10 @@ await runner(ctx); | ||
const ref = context.payload.check_run.head_sha; | ||
console.log("ref", ref); | ||
const { owner, repo } = context.repo(); | ||
console.log("owner", owner); | ||
console.log("repo", repo); | ||
const action = context.payload.action; | ||
console.log("action", action); | ||
const pullRequests = context.payload.check_run.pull_requests; | ||
console.log("pullRequests", pullRequests); | ||
const before = context.payload.check_run.check_suite.before; | ||
@@ -38,3 +45,5 @@ const fullAction = 'check_run.' + action; | ||
}); | ||
console.log("loadFile", loadFile); | ||
const loadConfig = createConfigLoader({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
console.log("loadConfig", loadConfig); | ||
await handleSchemaDiff({ | ||
@@ -86,2 +95,36 @@ release, | ||
})); | ||
app.on('pull_request.synchronize', wrap(async (context) => { | ||
const ref = context.payload.pull_request.head.sha; | ||
const pullRequestNumber = context.payload.pull_request.number; | ||
const { owner, repo } = context.repo(); | ||
const action = context.payload.action; | ||
const pullRequests = [context.payload.pull_request]; | ||
const before = context.payload.pull_request.base.sha; | ||
const fullAction = 'pull_request.' + action; | ||
if (['opened', 'synchronize', 'edited', 'labeled', 'unlabeled'].includes(action) === false) { | ||
return; | ||
} | ||
const loadFile = createFileLoader({ | ||
context, | ||
owner, | ||
repo, | ||
release, | ||
action: fullAction, | ||
}); | ||
const loadConfig = createConfigLoader({ context, owner, repo, ref, release, action: fullAction }, loadFile); | ||
await handleSchemaDiff({ | ||
release, | ||
action: fullAction, | ||
context, | ||
ref, | ||
repo, | ||
owner, | ||
loadFile, | ||
loadConfig, | ||
before, | ||
pullRequests, | ||
pullRequestNumber, | ||
onError, | ||
}); | ||
})); | ||
app.on('pull_request', wrap(async (context) => { | ||
@@ -88,0 +131,0 @@ const ref = context.payload.pull_request.head.sha; |
@@ -39,2 +39,3 @@ import { buildSchema } from 'graphql'; | ||
}; | ||
console.log("oldPointer", oldPointer); | ||
const newPointer = { | ||
@@ -44,2 +45,3 @@ path: config.schema, | ||
}; | ||
console.log("newPointer", newPointer); | ||
const sources = await loadSources({ | ||
@@ -51,2 +53,3 @@ config, | ||
}); | ||
console.log("sources", sources); | ||
const schemas = { | ||
@@ -62,2 +65,3 @@ old: buildSchema(sources.old, { | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -81,2 +85,3 @@ const changes = await diff(schemas.old, schemas.new); | ||
const actions = []; | ||
console.log("actions", actions); | ||
let commit; | ||
@@ -106,2 +111,3 @@ if ("commits" in payload) { | ||
} | ||
console.log("notifications", notifications.webhook); | ||
if (notifications.webhook) { | ||
@@ -108,0 +114,0 @@ actions.push(actionRunner('webhook', () => notifyWithWebhook({ |
@@ -22,2 +22,3 @@ import { annotate, complete, start } from './helpers/check-runs.js'; | ||
}); | ||
console.log("checkRunId", checkRunId); | ||
try { | ||
@@ -98,2 +99,3 @@ logger.info(`Looking for config`); | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -105,2 +107,3 @@ const action = await diff({ | ||
}); | ||
console.log("action", action); | ||
logger.info(`schema diff result is ready`); | ||
@@ -107,0 +110,0 @@ let conclusion = action.conclusion; |
@@ -39,2 +39,3 @@ import { buildSchema } from 'graphql'; | ||
}; | ||
console.log("oldPointer", oldPointer); | ||
const newPointer = { | ||
@@ -44,2 +45,3 @@ path: config.schema, | ||
}; | ||
console.log("newPointer", newPointer); | ||
const sources = await loadSources({ | ||
@@ -51,2 +53,3 @@ config, | ||
}); | ||
console.log("sources", sources); | ||
const schemas = { | ||
@@ -62,2 +65,3 @@ old: buildSchema(sources.old, { | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -81,2 +85,3 @@ const changes = await diff(schemas.old, schemas.new); | ||
const actions = []; | ||
console.log("actions", actions); | ||
let commit; | ||
@@ -106,2 +111,3 @@ if ("commits" in payload) { | ||
} | ||
console.log("notifications", notifications.webhook); | ||
if (notifications.webhook) { | ||
@@ -108,0 +114,0 @@ actions.push(actionRunner('webhook', () => notifyWithWebhook({ |
@@ -22,2 +22,3 @@ import { annotate, complete, start } from './helpers/check-runs.js'; | ||
}); | ||
console.log("checkRunId", checkRunId); | ||
try { | ||
@@ -98,2 +99,3 @@ logger.info(`Looking for config`); | ||
}; | ||
console.log("schemas", schemas); | ||
logger.info(`built schemas`); | ||
@@ -105,2 +107,3 @@ const action = await diff({ | ||
}); | ||
console.log("action", action); | ||
logger.info(`schema diff result is ready`); | ||
@@ -107,0 +110,0 @@ let conclusion = action.conclusion; |
{ | ||
"name": "@graphql-inspector/github", | ||
"version": "4.0.2-alpha-20230723093647-d1404a7d", | ||
"version": "4.0.2-alpha-20230723111821-90ebc400", | ||
"description": "GraphQL Inspector's Probot. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
856151
18932