-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from gentlementlegen/fix/pr-state
fix: pull-request state adjustments
- Loading branch information
Showing
9 changed files
with
71 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const MUTATION_PULL_REQUEST_TO_DRAFT = /* GraphQL */ ` | ||
mutation ConvertPullRequestToDraft($input: ConvertPullRequestToDraftInput!) { | ||
convertPullRequestToDraft(input: $input) { | ||
pullRequest { | ||
id | ||
isDraft | ||
} | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
import { createPlugin } from "@ubiquity-os/plugin-sdk"; | ||
import { Manifest } from "@ubiquity-os/plugin-sdk/dist/manifest"; | ||
import { LOG_LEVEL } from "@ubiquity-os/ubiquity-os-logger"; | ||
import { ExecutionContext } from "hono"; | ||
import manifest from "../manifest.json"; | ||
import { run } from "./run"; | ||
import { Env, envSchema, PluginSettings, pluginSettingsSchema, SupportedEvents } from "./types/plugin-input"; | ||
|
||
export default { | ||
async fetch(request: Request, env: Record<string, string>, executionCtx?: ExecutionContext) { | ||
return createPlugin<PluginSettings, Env, null, SupportedEvents>( | ||
(context) => { | ||
return run(context); | ||
}, | ||
manifest as Manifest, | ||
{ | ||
envSchema: envSchema, | ||
settingsSchema: pluginSettingsSchema, | ||
logLevel: process.env.LOG_LEVEL || LOG_LEVEL.INFO, | ||
postCommentOnError: false, | ||
...(env.KERNEL_PUBLIC_KEY && { kernelPublicKey: env.KERNEL_PUBLIC_KEY }), | ||
bypassSignatureVerification: process.env.NODE_ENV === "local", | ||
} | ||
).fetch(request, env, executionCtx); | ||
const app = createPlugin<PluginSettings, Env, null, SupportedEvents>( | ||
(context) => { | ||
return run(context); | ||
}, | ||
manifest as Manifest, | ||
{ | ||
envSchema: envSchema, | ||
settingsSchema: pluginSettingsSchema, | ||
logLevel: process.env.LOG_LEVEL || LOG_LEVEL.INFO, | ||
postCommentOnError: false, | ||
kernelPublicKey: process.env.KERNEL_PUBLIC_KEY, | ||
bypassSignatureVerification: process.env.NODE_ENV === "local", | ||
} | ||
); | ||
|
||
export default { | ||
fetch: app.fetch, | ||
port: 4000, | ||
}; |