Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
2
-
Description
Summary(Customer's use-case)
In a large development environment where there are multiple developers working on a project, they may have to create different kind of branches for their development. During that process they might delete those branches also. For monitoring and performance analysis purpose, it is important to know when branches were created within that repository and what is their timestamp which also helps us to track whether any branch is recreated with same name or not to avoid mistakes in code commits.
Expected result
The branch creation date should be available in the Bitbucket user interface
Workaround
SQL query (PostgreSQL)
-- Repository name select r.name as "Repository",rpr.ref_id as "Branch", a.created_timestamp as "Created at" from sta_repo_push_ref rpr left join sta_activity a on a.id=rpr.activity_id left join sta_repo_push_activity rpa on rpa.activity_id=a.id left join sta_repo_activity ra on ra.activity_id=rpa.activity_id left join repository r on r.id=ra.repository_id where trigger_id='branch-create' and r.name='repository_name' -- Branch name select r.name as "Repository",rpr.ref_id as "Branch", a.created_timestamp as "Created at" from sta_repo_push_ref rpr left join sta_activity a on a.id=rpr.activity_id left join sta_repo_push_activity rpa on rpa.activity_id=a.id left join sta_repo_activity ra on ra.activity_id=rpa.activity_id left join repository r on r.id=ra.repository_id where trigger_id='branch-create' and rpr.ref_id like '%branch_name'
From Git
git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate)%09%(refname:short)' refs/heads
Thank you.
Attachments
Issue Links
- mentioned in
-
Page Loading...