From 18a6d6a7ca6fcf8de9d8b66c5051aff69466429e Mon Sep 17 00:00:00 2001 From: Gianluca Date: Mon, 19 Sep 2016 17:29:45 +0200 Subject: [PATCH] Add command to search pull requests --- lib/v3.d/pulls.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/v3.d/pulls.sh b/lib/v3.d/pulls.sh index a4a0ec5..c52fd36 100644 --- a/lib/v3.d/pulls.sh +++ b/lib/v3.d/pulls.sh @@ -11,6 +11,15 @@ task_list() { $(base_uri)/repos/${owner}/${repo}/pulls?state=${state:-open} } +task_search() { + # '/search/issues?q=is:pr+state:open+repo:xx+head:feature/xxw' + local owner=$1 repo=$2 state=$3 head=$4 + + call_api -X GET \ + "$(base_uri)/search/issues?q=is:pr+state:${state:-open}+repo:$owner/$repo+head:$head" + +} + task_get() { # http://developer.github.com/v3/pulls/#get-a-single-pull-request local owner=$1 repo=$2 number=$3