summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
Diffstat (limited to 'git.c')
-rw-r--r--git.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/git.c b/git.c
index e20cfd6..e56035b 100644
--- a/git.c
+++ b/git.c
@@ -377,6 +377,16 @@ pull_request *get_pull_request(index_t *idx, const char *root, const char *repo)
}
}
+int get_pr_type(void *ctx, void *data, const keyword *key, keyword_val *val) {
+ pull_request *pr = (pull_request *)data;
+ if (key->type == TYPE_INT && pr != NULL) {
+ val->i = pr->pr_type;
+ return 1;
+ } else {
+ return -1;
+ }
+}
+
int has_remote_branch(void *ctx, void *data, const keyword *key, keyword_val *val) {
pull_request *pr = (pull_request *)data;
return (pr->pr_type) ? 0 : -1;