Generate Report on Feature Branches Use or Not Being Used

Socko-71 May 13, 2020

We have an issue with groups not maintaining their projects or repos and removing old and unused feature branches. Is there a report that can be generated that shows last access or commits on all projects, repos, and/or branches. Is there an add-on to do such a thing.

1 answer

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2020

One option is to use regular Git commands to list branches and the last commit date for each branch. This command should do that for you:

for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch;done | sort -r

The only app that I know that you can use to get similar information is Awesome Graphs, if there is no report that does it you can always export the raw data and generate a report from it.

Socko-71 June 10, 2021

Is there a way to script this so I don't have to go through each repo and run this?  I mean like a loop that goes through each project, then each repo of the project and then this query

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2021

You could use the REST API to get the projects and corresponding repos, but you would have to clone each one and then run the Git command on the clone. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events