Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 33ffddc

Browse files
committed
Ignore draft PRs outside of the project board
1 parent 251e2ba commit 33ffddc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/queries/all-open-prs-query.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ query GetAllOpenPRsAndCardIDs($after: String) {
1010
edges {
1111
cursor
1212
node {
13+
isDraft
1314
number
1415
updatedAt
1516
projectCards(first: 100) { nodes { id } }
@@ -38,7 +39,7 @@ export async function getAllOpenPRsAndCardIDs() {
3839
if (!edge) continue;
3940
const { node, cursor } = edge;
4041
after = cursor;
41-
if (!node) continue;
42+
if (!node || node.isDraft) continue;
4243

4344
prNumbers.push(node.number);
4445
node.projectCards.nodes?.forEach(n => n && cardIDs.push(n.id));

src/queries/schema/GetAllOpenPRsAndCardIDs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export interface GetAllOpenPRsAndCardIDs_repository_pullRequests_edges_node_proj
2222

2323
export interface GetAllOpenPRsAndCardIDs_repository_pullRequests_edges_node {
2424
__typename: "PullRequest";
25+
/**
26+
* Identifies if the pull request is a draft.
27+
*/
28+
isDraft: boolean;
2529
/**
2630
* Identifies the pull request number.
2731
*/

0 commit comments

Comments
 (0)