Skip to content

Instantly share code, notes, and snippets.

View wknapik's full-sized avatar

Wojciech Knapik wknapik

View GitHub Profile
@wknapik
wknapik / released-in.sh
Created October 3, 2024 02:26
Print the earliest Brave browser release containing PR code
#!/usr/bin/env bash
# Print the earliest Brave browser release containing PR code
# USAGE: released-in <PR_NUMBER | PR_URL | GIT_REF>
# Requires: bash>=4, coreutils, curl, git, grep, jq
set -eEo pipefail
shopt -s inherit_errexit
if [[ "$1" == */pull/* ]]; then
pr_number="$(grep -oE 'pull/[0-9]+' <<<"$1"|cut -d/ -f2)"