How to get audit logs generated for all the repository in a project.

Snehil Kumar May 31, 2023

The log should include information about commits/pull requests/branches/number of commits by users and other such activities.

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2023

Hi Snehil,

 

This feature is not natively supported in Bitbucket - however, I have raised a feature request on your behalf with our development team. With consideration of our feature implementation policies - please feel free to "Watch" this ticket to receive future updates related to it and "Vote" for it to improve its visiblity with regard to customer demand:

In the interim, there are add-ons such as AwesomeGraphs for Bitbucket Cloud that can show this data visually - I would recommend trying this:

Cheers!

- Ben (Bitbucket Cloud Support)

Snehil Kumar June 6, 2023

Thanks Ben. I would like to know if this can be achieved by log commands in git

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2023

Hi @Snehil Kumar 

Pull requests are performed purely through the UI, the data is not shown in GIT as GIT doesn't know what a PR is, you can gather information using our pull request API:

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-get 

GIT commands are a bit limited in scope for showing stats, however, you could perform some of these as an example - I would recommend reading through GIT documentation for more insight:

// Total commits by author since a certain date
git shortlog -s -n --all --since 2022-01-01

// Total commits by author - all time
git shortlog -s -n --all

// Total commits per branch
git rev-list --count <branch-name>

Cheers!

- Ben (Bitbucket Cloud Support)

Snehil Kumar June 6, 2023

Thanks Ben. Appreciate it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events