issues.dcgi - gophercgis - Collection of gopher CGI/DCGI for geomyidae
 (HTM) hg clone https://bitbucket.org/iamleot/gophercgis
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       issues.dcgi
       ---
            1 #!/bin/sh
            2 
            3 . ../common/config.sh
            4 
            5 ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
            6 ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
            7 COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
            8 PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
            9 
           10 
           11 case "$2" in
           12 */*)
           13         owner=${2%%/*}
           14         repo=${2##*/}
           15         ;;
           16 *)
           17         exit 1
           18         ;;
           19 esac
           20 
           21 
           22 url="https://api.github.com/repos/${owner}/${repo}/issues"
           23 curl -Lgs -- "${url}" |
           24     jq -r '
           25     "t",
           26     "tGitHub - '"${owner}/${repo}"' issues",
           27     "t",
           28     ( .[] |
           29         "[1|#\(.number) \(.title | gsub("\\|"; "\\|"))|" +
           30             "'"${ISSUE_CGI}?${owner}/${repo}/"'\(.number)|server|port]",
           31         "t\(.state)   @\(.user.login)   \(.created_at[0:10])   (\(.comments))",
           32         "t"
           33     )
           34 '