Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is the commit author stored in the Bitbucket database?

Mark Finta
Contributor
January 21, 2019

I have searched up and down the tables of Bitbucket to no avail on being able to link a person to the changeset hash they created.

I have been able to figure out the activity_type code mappings and that is nice in that regard, but being able to do a join to add the associated author to the changeset in the dbo.changeset table would be awesome.  I understand that there is the rest service that does hold this information and I also completely understand that from a support standpoint that is the supported way to retrieve this data, but I just want a quick way to get a list of all changesets linked to their authors and I just can't locate the table that would allow me to write the correct join.  Can anyone assist?  Or is this piece of data not stored in the database?

2 answers

1 accepted

0 votes
Answer accepted
Mark Finta
Contributor
January 24, 2019

Update: I wasn't able to get this information for every single changeset.  But I was able to get the information in a different manner.  By joining the Changeset table (which has the author timestamp) to the sta_repo_push_ref table, I was able to get the dates changesets were created that were pushed back to bitbucket.  Also to get the user, sta_repo_push_ref table has the "activity_id" and the "user_id".  By doing a join on the activity_id I was able to get the user doing the push back to the repository.

So technically, this won't get all changesets if you did a migration of your code with history included, but this is definitely the best closest solution I was able to concoct.

0 votes
Bhushan Nagaraj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 21, 2019

Hi Mark,

I understand you might be looking directly at the database for a specific requirement. However, I don't think this is stored in the DB.

Git stores this info in the repository. You can use a Git command to get the info.

https://stackoverflow.com/questions/4259996/how-can-i-view-a-git-log-of-just-one-users-commits

Cheers

Bhushan

Mark Finta
Contributor
January 24, 2019

see accepted answer, was able to figure it out.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events