Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12028

Provide creation date of a branch in Bitbucket UI

    XMLWordPrintable

Details

    • 2
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    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

          Activity

            People

              Unassigned Unassigned
              abimba@atlassian.com Andrew Bimba
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: