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

Commit

Permalink
Ignore draft PRs outside of the project board
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Jan 26, 2021
1 parent 251e2ba commit 33ffddc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/queries/all-open-prs-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ query GetAllOpenPRsAndCardIDs($after: String) {
edges {
cursor
node {
isDraft
number
updatedAt
projectCards(first: 100) { nodes { id } }
Expand Down Expand Up @@ -38,7 +39,7 @@ export async function getAllOpenPRsAndCardIDs() {
if (!edge) continue;
const { node, cursor } = edge;
after = cursor;
if (!node) continue;
if (!node || node.isDraft) continue;

prNumbers.push(node.number);
node.projectCards.nodes?.forEach(n => n && cardIDs.push(n.id));
Expand Down
4 changes: 4 additions & 0 deletions src/queries/schema/GetAllOpenPRsAndCardIDs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export interface GetAllOpenPRsAndCardIDs_repository_pullRequests_edges_node_proj

export interface GetAllOpenPRsAndCardIDs_repository_pullRequests_edges_node {
__typename: "PullRequest";
/**
* Identifies if the pull request is a draft.
*/
isDraft: boolean;
/**
* Identifies the pull request number.
*/
Expand Down

0 comments on commit 33ffddc

Please sign in to comment.