Created
August 6, 2025 08:34
-
-
Save pascalchevrel/0348d6b4e94f4252bee6f90760aca5f6 to your computer and use it in GitHub Desktop.
extract_fxios_tickets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Function to extract the list of Jira tickets touched by commits in firefox-ios repo | |
| # The first parameter is the commit hash of the version bump | |
| # You can passs a folder as an optional parameter to only extract focus-ios tickets for example | |
| extract_fxios_tickets() { | |
| if [ -z "$1" ]; then | |
| echo "Usage: extract_fxios_tickets <starting_commit> [path]" | |
| return 1 | |
| fi | |
| local start_commit="$1" | |
| local path="$2" | |
| local jira_base_url="https://mozilla-hub.atlassian.net/browse" | |
| echo "Starting point: https://github.com/mozilla-mobile/firefox-ios/commit/$1" | |
| [ -n "$path" ] && echo -e "Limited to folder: $2" | |
| echo "" | |
| local log_output | |
| if [ -n "$path" ]; then | |
| log_output=$(git log --pretty=format:"%h - %s" "${start_commit}...HEAD" -- "$path") | |
| else | |
| log_output=$(git log --pretty=format:"%h - %s" "${start_commit}...HEAD") | |
| fi | |
| echo "$log_output" | grep -oEi 'FXIOS-[0-9]+' | sort -u | while read -r ticket; do | |
| echo -e "$ticket\t${jira_base_url}/${ticket}" | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment