Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-12534

Ability to add filters to the returned data of the "Commits" Resource

    XMLWordPrintable

    Details

    • Feedback Policy:

      Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Description

      As said in the Title, currently there are not a way to filter the current commits returned when hit commits endpoint.

      Some user histories that i need to get covered (doing it by my self on my endpoint but think
      that would be a nice addition to the API).

      Commits Resource: https://confluence.atlassian.com/bitbucket/commits-or-commit-resource-389775478.html

      User histories:

      As a third party consumer i want to get all commits on a repository filtered by an author name.
      -https://api.bitbucket.org/2.0/repositories/

      {owner}/{repository}/commits?author={author_name}

      As a third party consumer i want to get all commits on a repository filtered by date starting from {date}:
      -https://api.bitbucket.org/2.0/repositories/{owner}

      /

      {repository}/commits?from={date}

      As a third party consumer i want to get all commits on a repository filtered by date starting until {date}:
      -https://api.bitbucket.org/2.0/repositories/{owner}/{repository}

      /commits?until=

      {date}

      As a third party consumer i want to get all commits on a repository filtered by date starting from {date}

      and until

      {date}:
      https://api.bitbucket.org/2.0/repositories/{owner}/{repository}/commits?from={date'}&until={date}

      As noted above, and Like it is working now most of the api, all the parameters are optional, so eventually, We can can get commits on a private repository filtered by author and date.

      https://api.bitbucket.org/2.0/repositories/

      {owner}

      /

      {repository}

      /commits?access_token=

      {access_token}

      &author=

      {author_username}

      &from=

      {date}&until={date}

      -Parameters names are just examples names.
      -Author value should be the author username and not the actual returned author value in the actual response.

      Additional & Off-topic comments:

      -Seems that this feature is even not present on the bitbucket UI, so if codebase is shared somehow it could be reused there to add some nice features! (Quickly view my own commits on a repository or another user commits, etc).
      -Maybe this is duplicated already but could not find the issue yet.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            84a924a8273e Ezequiel Carrizo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: