Skip to content

Commit

Permalink
Add support for draft PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
rgehan committed Jan 5, 2024
1 parent 300e806 commit 580047f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/providers/github/predicates/draft.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IDropdownPredicate, PredicateType } from '../../types';

export const draft: IDropdownPredicate = {
name: 'draft',
label: 'Is Draft?',
type: PredicateType.DROPDOWN,
choices: [
{ value: 'false', label: 'No' },
{ value: 'true', label: 'Yes' },
],
operators: [],
serialize: ({ value }) => `draft:${value}`,
};
2 changes: 2 additions & 0 deletions src/providers/github/predicates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { mergeStatus } from './mergeStatus';
import { review } from './review';
import { status } from './status';
import { type } from './type';
import { draft } from "./draft";

enum GithubOperators {
EQUAL = 'equal',
Expand Down Expand Up @@ -120,4 +121,5 @@ export const availablePredicates: Predicate[] = [
status,
mergeStatus,
review,
draft,
];

0 comments on commit 580047f

Please sign in to comment.