mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
taskie: Added initial version.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
613ef65f67
commit
73f634318f
6 changed files with 240 additions and 1 deletions
17
inc/taskie/backend.github.inc.sh
Normal file
17
inc/taskie/backend.github.inc.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
backend.github.with() {
|
||||
github_repository=$(echo $backendId | cut -d: -f2)
|
||||
github_api_url=https://api.github.com
|
||||
github_api_user=$(nux.cfg.read github.user)
|
||||
github_api_token=$(nux.cfg.read github.api.token)
|
||||
github_issuemap=~/.config/taskie/github.issuemap.json
|
||||
nux.log debug Github repository is $github_repository;
|
||||
nux.log debug Github API URL: $github_api_url;
|
||||
}
|
||||
|
||||
backend.github.list() {
|
||||
local api="$github_api_url/repos/$github_repository/issues"
|
||||
|
||||
CURL_ADDITIONAL_ARGS="-u $github_api_user:$github_api_token" \
|
||||
backend.githublike.get "$api" | jq -r ".[] | [.number,.state,.title] | @sh"
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue