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

Support for providing the committer (in addition to author) in the API

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • 5.0.0
    • None
    • None
    • 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.

      Users have a requirement to distinguish between the author and the committer in pre-receive hooks etc.

      Although this is possible to get the committer information via the low-level git API, it's much more cumbersome than the higher-level API which returns for example com.atlassian.bitbucket.commit.Commit objects.

      Consider adding the following methods to Commit:

      @Nonnull
      Person getCommitter();
      
      @Nonnull
      Date getCommitterTimestamp();
      

            [BSERV-8802] Support for providing the committer (in addition to author) in the API

            Bitbucket Server 5.0 will introduce Commit.getCommitter(), Commit.getCommitterTimestamp(), Blame.getCommitter() and Blame.getCommitterTimestamp(). The new properties are available via both the Java API and the REST API.

            In addition, Bitbucket Server 5.0 also introduces the ability to pass an explicit committer to MergeCommandParameters when creating merges, allowing plugin developers to control author and committer independently. If one is provided and not the other, it will be used for both (so if you only provide an author, they'll also be the committer, and if you only provide a committer, they'll also be the author).

            Rendering the new data in the UI will be tracked separately on BSERV-8868. Changes to how pull request merges are handled are also tracked separately, on BSERV-4415. This issue only tracks the API enhancement.

            Best regards,

            Bryan Turner (Inactive) added a comment - Bitbucket Server 5.0 will introduce Commit.getCommitter() , Commit.getCommitterTimestamp() , Blame.getCommitter() and Blame.getCommitterTimestamp() . The new properties are available via both the Java API and the REST API. In addition, Bitbucket Server 5.0 also introduces the ability to pass an explicit committer to MergeCommandParameters when creating merges, allowing plugin developers to control author and committer independently. If one is provided and not the other, it will be used for both (so if you only provide an author, they'll also be the committer, and if you only provide a committer, they'll also be the author). Rendering the new data in the UI will be tracked separately on BSERV-8868 . Changes to how pull request merges are handled are also tracked separately, on BSERV-4415 . This issue only tracks the API enhancement. Best regards,

            JamieA added a comment -

            In short, it's a customer in a highly regulated environment. They would like stricter validation in a pre-receive hook, and want to treat cherry-picked commits written by another person differently from someone pushing their own commits. Could you open this issue up? My colleague has further information that he's not able to add.

            JamieA added a comment - In short, it's a customer in a highly regulated environment. They would like stricter validation in a pre-receive hook, and want to treat cherry-picked commits written by another person differently from someone pushing their own commits. Could you open this issue up? My colleague has further information that he's not able to add.

              bturner Bryan Turner (Inactive)
              714061b26763 JamieA
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: