[go: up one dir, main page]

Skip to content

Docs feedback - feature proposal: Tag commit author submodel with id and/or web_url

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

The current response of the tags endpoint currently returns information about the commit, the tag annotates. However, it only has the authors name and email address. If one wants to use that in a link, these information might not be sufficient. Therefore, we add a submodel to the commit model just like it is done for other endpoint's models as well, having the author's id, username and web_url.

Problem to solve

The current response of the tags endpoint already returns information about the commit, the tag annotates. However, it only has the authors name and email address. If one wants to use that in a link, these information might not be sufficient.

Intended users

User experience goal

The user should be able to use the API to get the tag commit author's information in a way that they can display a link to the author's profile.

Proposal

Therefore, I propose to add a submodel to the commit model just like it is done for other endpoint's models as well, having the author's id, username and web_url.

Notes (from @vyaklushin)

  1. We can extend the response with new fields author and committer. But cannot remove old ones (like author_name or author_email), because of the backward compatibility reasons.
  2. We should verify the impact on the performance of the endpoint, because this change might lead to extra queries to fetch author and committer information.

Permissions and Security

Documentation

Only the response example needs to be updated.

From:

...
      "commit":{
         "id":"079e90101242458910cccd35eab0e211dfc359c0",
         "short_id":"079e9010",
         "title":"Update README.md",
         "created_at":"2019-01-03T01:55:38.000Z",
         "parent_ids":[
            "f8d3d94cbd347e924aa7b715845e439d00e80ca4"
         ],
         "message":"Update README.md",
         "author_name":"Administrator",
         "author_email":"admin@example.com",
         "authored_date":"2019-01-03T01:55:38.000Z",
         "committer_name":"Administrator",
         "committer_email":"admin@example.com",
         "committed_date":"2019-01-03T01:55:38.000Z"
      }
...

to:

...
      "commit":{
         "id":"079e90101242458910cccd35eab0e211dfc359c0",
         "short_id":"079e9010",
         "title":"Update README.md",
         "created_at":"2019-01-03T01:55:38.000Z",
         "parent_ids":[
            "f8d3d94cbd347e924aa7b715845e439d00e80ca4"
         ],
         "message":"Update README.md",
         "author":{
            "id":1,
            "name":"Administrator",
            "username":"root",
            "state":"active",
            "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
            "web_url":"https://gitlab.example.com/root"
         },
         "authored_date":"2019-01-03T01:55:38.000Z",
         "committer":{
            "id":1,
            "name":"Administrator",
            "username":"root",
            "state":"active",
            "avatar_url":"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
            "web_url":"https://gitlab.example.com/root"
         },
         "committed_date":"2019-01-03T01:55:38.000Z"
      }
...

Availability & Testing

Available Tier

All Tiers

Feature Usage Metrics

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

What is the competitive advantage or differentiation for this feature?

Links / references

Edited by 🤖 GitLab Bot 🤖