Skip to content

Conversation

richmahn
Copy link
Contributor

Fixes #7238 to properly give the right tag ID and commit ID for annotated tags, and to make sure a lightweight and annotated tag of the same commit ID do not get confused with each other. New output for my annotated and lightweight tags:

[
  {
    "name": "annotated",
    "id": "98aa45c66274edff407e71698006e0df0ca342af",
    "commit": {
      "url": "http://localhost:3000/api/v1/repos/root/test/git/commits/98aa45c66274edff407e71698006e0df0ca342af",
      "sha": "07ce8fe7370c6fe50b1ae87e5bc51780853fb310"
    },
    "zipball_url": "http://localhost:3000/root/test/archive/annotated.zip",
    "tarball_url": "http://localhost:3000/root/test/archive/annotated.tar.gz"
  },
  {
    "name": "lightweight",
    "id": "07ce8fe7370c6fe50b1ae87e5bc51780853fb310",
    "commit": {
      "url": "http://localhost:3000/api/v1/repos/root/test/git/commits/07ce8fe7370c6fe50b1ae87e5bc51780853fb310",
      "sha": "07ce8fe7370c6fe50b1ae87e5bc51780853fb310"
    },
    "zipball_url": "http://localhost:3000/root/test/archive/lightweight.zip",
    "tarball_url": "http://localhost:3000/root/test/archive/lightweight.tar.gz"
  },
  {
    "name": "v2",
    "id": "665586173ff113f6f3b6313dada6cf39f7d19c30",
    "commit": {
      "url": "http://localhost:3000/api/v1/repos/root/test/git/commits/665586173ff113f6f3b6313dada6cf39f7d19c30",
      "sha": "665586173ff113f6f3b6313dada6cf39f7d19c30"
    },
    "zipball_url": "http://localhost:3000/root/test/archive/v2.zip",
    "tarball_url": "http://localhost:3000/root/test/archive/v2.tar.gz"
  },
  {
    "name": "v1",
    "id": "4f6b2b2f0af205f642337dff42bb516337d7121f",
    "commit": {
      "url": "http://localhost:3000/api/v1/repos/root/test/git/commits/4f6b2b2f0af205f642337dff42bb516337d7121f",
      "sha": "4f6b2b2f0af205f642337dff42bb516337d7121f"
    },
    "zipball_url": "http://localhost:3000/root/test/archive/v1.zip",
    "tarball_url": "http://localhost:3000/root/test/archive/v1.tar.gz"
  }
]

@codecov-io
Copy link

codecov-io commented Jun 28, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@7bd0dc4). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #7321   +/-   ##
=========================================
  Coverage          ?   41.24%           
=========================================
  Files             ?      464           
  Lines             ?    62867           
  Branches          ?        0           
=========================================
  Hits              ?    25931           
  Misses            ?    33543           
  Partials          ?     3393
Impacted Files Coverage Δ
routers/api/v1/convert/convert.go 83.96% <100%> (ø)
modules/git/repo_tag.go 58.82% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bd0dc4...529afa4. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 28, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 28, 2019
@lunny lunny added the type/bug label Jun 29, 2019
@lunny lunny added this to the 1.9.0 milestone Jun 29, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 29, 2019
@zeripath zeripath merged commit 567e117 into go-gitea:master Jun 29, 2019
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* Fixes go-gitea#7238 - Annotated tag commit ID incorrect

* Fixes go-gitea#7238 - Annotated tag commit ID incorrect
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api/v1/repos/stephenc/repo/tags endpoint not returning lightweight tags correctly
5 participants