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

Method openPR

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

Source from the content-addressed store, hash-verified

521 }
522
523 async openPR(number: number) {
524 const pullRequest = await this.getPullRequest(number);
525
526 const { data } = await this.mutate({
527 mutation: mutations.reopenPullRequest,
528 variables: {
529 reopenPullRequestInput: { pullRequestId: pullRequest.id },
530 },
531 update: (store, { data: mutationResult }) => {
532 const { pullRequest } = mutationResult!.reopenPullRequest;
533 const pullRequestData = { repository: { ...pullRequest.repository, pullRequest } };
534
535 store.writeQuery({
536 ...this.getPullRequestQuery(pullRequest.number),
537 data: pullRequestData,
538 });
539 },
540 });
541
542 return data!.reopenPullRequest;
543 }
544
545 async closePR(number: number) {
546 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