Skip to content

Group issues per milestone #6178

Answered by LangLangBart
birbilis asked this question in Q&A
Sep 2, 2022 · 3 comments · 12 replies
Discussion options

You must be logged in to vote

Alternatively, go through the milestones in a loop using a small shell function.

function milestoneList {
	if [ ${#@} -ne 2 ]; then
		echo -e "!!! Respect the syntax: $0 OWNER_NAME REPO_NAME"
		return 1
	fi
	MILESTONE_TITLE=()
	while IFS='' read -r line; do MILESTONE_TITLE+=("$line"); done < <(gh api -X GET /repos/"$1/$2"/milestones -f sort=due_on -f direction=desc -f state=open --jq '.[] | .title')

	for i in "${MILESTONE_TITLE[@]}"; do
		echo -n "Milestone $i"
		GH_PAGER="cat" gh issue list --milestone "$i"  --search "sort:updated-desc" --state open --repo "$1/$2"
		echo
	done
}

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
2 replies
@birbilis
Comment options

@birbilis
Comment options

Comment options

You must be logged in to vote
9 replies
@birbilis
Comment options

@LangLangBart
Comment options

@birbilis
Comment options

@birbilis
Comment options

@birbilis
Comment options

Answer selected by birbilis
Comment options

You must be logged in to vote
1 reply
@LangLangBart
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants