summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2025-10-21 15:45:52 +0200
committerOskar <oskar@mullvad.net>2025-10-23 13:03:32 +0200
commit561f9ba9e531c4ed53d460967e252c2da2da9d0a (patch)
treeb470a32ddfe4ad75409b9988ccea3cf3b7185cd8 /desktop/scripts
parent1978afb827799c0c822a0ca23c6d4d0cb4381f1e (diff)
downloadmullvadvpn-561f9ba9e531c4ed53d460967e252c2da2da9d0a.tar.xz
mullvadvpn-561f9ba9e531c4ed53d460967e252c2da2da9d0a.zip
Add script that lists github issues for a given version
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-xdesktop/scripts/list-github-issues-for-version58
1 files changed, 58 insertions, 0 deletions
diff --git a/desktop/scripts/list-github-issues-for-version b/desktop/scripts/list-github-issues-for-version
new file mode 100755
index 0000000000..de9f0afa39
--- /dev/null
+++ b/desktop/scripts/list-github-issues-for-version
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+set -eu
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cd "$SCRIPT_DIR"
+
+REPO_ROOT=../../
+
+VERSION=""
+MARKDOWN="false"
+PLAIN="false"
+
+source $REPO_ROOT/scripts/utils/log
+
+function print_usage {
+ log_info "Usage: $0 [--help|-h] [--markdown|--plain] <version>"
+}
+
+while [[ "$#" -gt 0 ]]; do
+ case $1 in
+ --help|-h)
+ print_usage
+ exit 1
+ ;;
+ --markdown) MARKDOWN="true";;
+ --plain) PLAIN="true";;
+ *) VERSION=$1 ;;
+ esac
+ shift
+done
+
+if [[ -z $VERSION ]]; then
+ log_error "Please give the app version as an argument to this script."
+ print_usage
+ exit 1
+fi
+
+function search {
+ gh search issues -R mullvad/mullvadvpn-app --state open --sort updated \
+ --json "title,number,url" --jq "$1" \
+ "$VERSION"
+}
+
+jq='to_entries | map(.value+{index: .key + 1})'
+if [[ "$MARKDOWN" == "true" ]]; then
+ jq+=' | map("\(.index). \(.title) ([#\(.number)](\(.url)))") | join("\n")'
+ search "$jq"
+elif [[ "$PLAIN" == "true" ]]; then
+ jq+=' | map("\(.index). \"\(.title) (#\(.number))\": \(.url))") | join("\n")'
+ search "$jq"
+else
+ jq+='.[] | "\(.index)\t\(.title)\t\(.number)\t\(.url)"'
+ search "$jq" | \
+ while IFS=$'\t' read -r index title number url; do
+ printf '%s. %s (\e]8;;%s\e\\%s\e]8;;\e\\)\n' "$index" "$title" "$url" "#$number"
+ done
+fi