Progress Reports
Asked by Cheryl Neil:

How can I get a weekly report for management that lists all the updates (pushes) for each repository in our Bitbucket project? This report would identify the "committers" (i.e., who made the modification to each file), the filename (including directory path), the branch name, and commit message. I'm new to Bitbucket and Git, but looks like Bitbucket doesn't provide a CLI, it's "just" a GUI (so can't issue git log from it)? Thanks.


Answers:
author: Mikael Sandberg
body: Bitbucket out-of-the-box doesn't offer such report, so you would have to get that information using [git shortlog](https://git-scm.com/docs/git-shortlog). You may also want to contact the vendor for [Awesome graphs](https://marketplace.atlassian.com/apps/1210934/awesome-graphs-for-bitbucket?hosting=server&tab=overview) and/or [Charts \& graphs](https://marketplace.atlassian.com/apps/1212147/charts-graphs-for-bitbucket?hosting=server&tab=overview) and see if they have any plans on offer the apps on Cloud. I know from previous experience that Awesome Graphs can give you that report.

comments: author: Cheryl Neil
body: Thank you, but I don't know how to enter a git command, such as**git shortlog** , while in Bitbucket Cloud. On my Windows PC, I can open a Command Prompt (CLI) window to issue git commands, but as you know they mostly operate on my local repository (except clone and push for example). I'm trying to issue a **git log** or **git shortlog** for my remote repository, i.e., Bitbucket Cloud repo. I don't see anywhere when I am in Bitbucket (in my web browser) to enter a git command, and I can't find Atlassian documentation telling me how to do this.

In the Command Prompt window, I tried providing one of my Bitbucket repo's URL in the line: "**git shortlog** *URL* " (where URL begins with "https:") but got "fatal: not a git repository (or any of the parent directories): .git". **Git shortlog** command format says I can provide a \<path\> but not a \<repository\>--I believe \<path\> means just a directory pathname (on my C drive), and not "https://".


author: Anastasia Voronova
body: Hi Cheryl,

I'm Anastasia from [Awesome Graphs for Bitbucket](https://marketplace.atlassian.com/apps/1210934/awesome-graphs-for-bitbucket-server?hosting=cloud&tab=overview).

What you're asking for is available with our app in its [Top Committers Report](https://docs.stiltsoft.com/awesome-graphs/cloud/commits-analytics/top-committers-report). It gives information about all committers to a repository with commit hashes and lists of files modified in each commit. You may install the app on your workspace using [this direct link](https://bitbucket.org/site/addons/authorize?addon_key=com.stiltsoft.stash.graphs&redirect_uri=https://awesome-graphs.stiltsoft.net/new-install).

Please, let me know if you need any assistance.


author: Mikael Sandberg
body: Git commands cannot be run in Bitbucket, you have to do that from your local machine.


author: Cheryl Neil
body: Hi Anastasia. I tried out your app's report, and it is pretty close. It looks like the report must be run from inside a repository. Is there a way to run it at the project level, so that the report will list updates to all repositories in the project (the time Period and Sort Committers selections would apply to all the repositories)?

We have 11 repositories and need a weekly report that lists changes for each repository. If I have to manually generate 11 reports this will be rather time-consuming. In addition, I \*may\* have to process the report to ensure that a filename is only listed once, and that means I'll need to get it into Excel to reformat etc.

Any help you can give me would be appreciated.


author: Anastasia Voronova
body: Hi Cheryl,

At the moment, we're working on bringing the app to the workspace level. At least you will need to generate 1 report instead of 11, so I hope it'll be helpful. We expect to finish this feature within a couple of months, I will let you know when it's available.

Do I understand correctly that you prefer having your report in excel rather than in UI? This is not available so far, so I will add your vote for this request in our backlog so we could consider developing it.

Thanks,  
Anastasia


author: Cheryl Neil
body: Hi Anatasia. My understanding is that I will need to wait until your app update is out in order to just generate 1 report, and for now I'll have to do 11, correct?

And yes, having an "output format" option would be great so that I can select Excel--highly needed.

In the future, I expect that I will need to be able to generate a list of files that have changed (added, updated, or deleted) from one git tag to another (i.e., one software release to another). If your report can help with that, that would also be great. We are new to Bitbucket, but this is such a common needed item that there must already be a way to get this information, and maybe I just need to investigate how to do this (e.g., I haven't read up on pipelines yet).

thanks so much!


author: Anastasia Voronova
body: > My understanding is that I will need to wait until your app update is out in order to just generate 1 report, and for now I'll have to do 11, correct?

Yes, you're right. I will add a comment here when it's ready to use.

I've got what you're looking for regarding files modified. Not sure if it's available with Bitbucket REST API (at least quick searching didn't give me an idea about it.

If we add this to the Awesome Graphs plugin, we need to understand the use case for this information. Could you please let me know how you would use those lists of files?

Thank you!


author: Cheryl Neil
body: Each time we will make an internal or external release, we will need the following information, which Top Committers Report already provides, but that's based on commits (hence the report name). This should probably be a new report, a Tag Compare report. We need the report in Excel format (viewing it on the web may be useful too):

* a list of the files (including their "pathnames", i.e., subfolder path) that have been changed from the "starting" tag to the "ending" tag (so we need to be able to specify 2 tag names)
* an indication of whether the files were added, deleted, modified. (Note: while unchanged files, that also have the start and end tags, should also be part of the report, they don't need to be marked as Unchanged--that's the default value, but their snapshot ID is needed)
* the snapshot ID for each file to identify its "version".

We do NOT need the committers name.

Right now I'm thinking we would apply a Git tag to the files for each release. I'm new to Git and Jira, so I don't know if there's a better way to do this. We are going to integrate with Jira, which has Pipelines for releases, but I haven't gotten that far. Jira is "ticket" (task/subtask) based, and one thing I don't know is how it will include files that were not worked on for a release (i.e., files unchanged from the previous release). Bitbucket (Git) I know can do this with its tag capability.

A release will include files from multiple repositories, but my understanding is that a Git tag only applies to a single repository (so we'll have to create a tag of the same name in multiple repositories). I don't know that it'd be reasonable to expect your report to be able to support this, whether there can be some kind of report config spec "file" that the user (me) can set up that specifies each repository and the start and end tags that we'd like a report on. Since a release is relatively infrequent, running the report 11 times, for each one of our 11 repositories, wouldn't be a problem--this would just be a "nice to have" feature to be able to run 1 report.

We will archive all the files that make up a release, including this report. So the report will provide the needed information as to what version of each file is in the archive. These archives and this report will be used by the maintenance team to solve problems in the field and by the production (development) team at times to determine how to make certain changes.


author: Anastasia Voronova
body: Hi Cheryl,

I've asked my team to make a quick research about your case and possible ways to solve it.

What we found is the following Git command:

```
git diff tags/{tag} tags/{tag} --compact-summary
```

That resolves is the following data as a list of files that have been modified between tags:

```
src/main/java/message/RetryLaterEvent.java (gone)                  |  11 ---

 src/main/java/message/WorkFinished.java (new)                     |  10 +++

 project/plugins.sbt                                               |   4 +-

 3 files changed, 21 insertions(+), 15 deletions(-)
```

You may run the Git commands locally on your computer. To do this, you need to

* install Git
* download repositories
* open the command line from each folder where your repository is placed
* run the command above adding your tag names instead of {first_tag} for each repository.

That's probably not the most convenient way but seems to be a solution for your case ?

I really hope it may help you somehow.

Thanks,

Anastasia


author: Cheryl Neil
body: I have already considered this as an alternate solution. It means I will have to clone all 11 repositories to my PC (a one-time operation) and every week update them and run a Git command on them such as git log or git status. It sounds like this is what I'll need to do, and maybe that's what everyone else does (and is why other tools in the Marketplace don't seem to provide this capability). I will try this out. Thanks for your reply!


author: Anastasia Voronova
body: Good! We haven't found other alternatives too.

At least when Awesome Graphs is available on the workspace level, it may help with a part of your case. As I mentioned, I will get back to you when we have news.

Thanks,  
Anastasia


author: Alexander Okulovich _Stiltsoft_
body: Hi [@Cheryl Neil](/t5/user/viewprofilepage/user-id/4137988),

I'm reaching out to inform you that we implemented the Graphs and Reports features on the workspace level. Please let me know if you have any questions.

Kind regards,

Alexander


Tags: bitbucket-cloud

cloud