stuff
This commit is contained in:
27
.local/bin/jira_export_todo
Executable file
27
.local/bin/jira_export_todo
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
JIRA_URL="https://jira.atg-corp.com"
|
||||
TOKEN="NDQ0ODE5ODQ5NDU0OkwyY36wdY9DAvXsBr1M4bMjFmp6"
|
||||
QUERY='project = "IS" AND status in (Open, "In Progress", Blocked, "Waiting for Customer", Stalled) AND assignee in (currentUser())'
|
||||
TODAY="$(date +%Y-%m-%d)"
|
||||
TODO_FILE="$HOME/docs/todo/todo.txt"
|
||||
TEMP_FILE="$(mktemp)"
|
||||
|
||||
# Encode JQL query
|
||||
ENCODED_QUERY=$(printf '%s' "$QUERY" | jq -s -R -r @uri)
|
||||
|
||||
# Fetch JIRA issues (requires `curl` and `jq`)
|
||||
curl -s -H "Authorization: Bearer $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
"$JIRA_URL/rest/api/2/search?jql=$ENCODED_QUERY" |
|
||||
jq -r '.issues[] | [.key, .fields.summary, .self] | @tsv' > "$TEMP_FILE"
|
||||
|
||||
# Prevent duplicates and append new tasks
|
||||
while IFS=$'\t' read -r key summary url; do
|
||||
if ! grep -q "\[$key\]" "$TODO_FILE"; then
|
||||
printf "(%s) [%s] %s @jira\n" "$TODAY" "$key" "$summary" >> "$TODO_FILE"
|
||||
echo "Added [$key] $summary"
|
||||
fi
|
||||
done < "$TEMP_FILE"
|
||||
|
||||
rm -f "$TEMP_FILE"
|
||||
@@ -3,6 +3,9 @@
|
||||
entry=$(gopass list --flat | bemenu -p Username: -l 25 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00')
|
||||
|
||||
if [ -n "$entry" ]; then
|
||||
gopass show -c "$entry" username 2>/dev/null || notify-send "Gopass Error" "Failed to copy username from: $entry"
|
||||
if gopass show -c "$entry" username 2>/dev/null; then
|
||||
notify-send "Gopass" "Username copied from: $entry"
|
||||
else
|
||||
notify-send "Gopass Error" "Failed to copy username from: $entry"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
TODO_FILE="$HOME/docs/todo.txt"
|
||||
ARCHIVE_FILE="$HOME/docs/todo-archive.txt"
|
||||
TODO_FILE="$HOME/docs/todo/todo.txt"
|
||||
ARCHIVE_FILE="$HOME/docs/todo/todo-archive.txt"
|
||||
TODAY="$(date +%Y-%m-%d)"
|
||||
|
||||
case "$1" in
|
||||
@@ -12,7 +10,7 @@ case "$1" in
|
||||
echo "($TODAY) $*" >> "$TODO_FILE"
|
||||
echo "Added: ($TODAY) $*"
|
||||
;;
|
||||
lsa)
|
||||
la)
|
||||
nl -w2 -s'. ' "$TODO_FILE"
|
||||
;;
|
||||
ls)
|
||||
|
||||
Reference in New Issue
Block a user