MCPcopy Create free account
hub / github.com/decaporg/decap-cms / openPR

Method openPR

packages/decap-cms-backend-github/src/GraphQLAPI.ts:517–537  ·  view source on GitHub ↗
(number: number)

Source from the content-addressed store, hash-verified

515 }
516
517 async openPR(number: number) {
518 const pullRequest = await this.getPullRequest(number);
519
520 const { data } = await this.mutate({
521 mutation: mutations.reopenPullRequest,
522 variables: {
523 reopenPullRequestInput: { pullRequestId: pullRequest.id },
524 },
525 update: (store, { data: mutationResult }) => {
526 const { pullRequest } = mutationResult!.reopenPullRequest;
527 const pullRequestData = { repository: { ...pullRequest.repository, pullRequest } };
528
529 store.writeQuery({
530 ...this.getPullRequestQuery(pullRequest.number),
531 data: pullRequestData,
532 });
533 },
534 });
535
536 return data!.reopenPullRequest;
537 }
538
539 async closePR(number: number) {
540 const pullRequest = await this.getPullRequest(number);

Callers

nothing calls this directly

Calls 3

getPullRequestMethod · 0.95
mutateMethod · 0.95
getPullRequestQueryMethod · 0.95

Tested by

no test coverage detected