Title: Get annotated tags · gitpython-developers/GitPython · Discussion #1937 · GitHub
Open Graph Title: Get annotated tags · gitpython-developers/GitPython · Discussion #1937
X Title: Get annotated tags · gitpython-developers/GitPython · Discussion #1937
Description: Get annotated tags
Open Graph Description: I need to use GItPython API to get annotated tags. If I do next: repo = git.Repo(repo_path) tags = repo.tags annotated_tags = [tag for tag in tags] I get list of lightweight tags. How do I get a li...
X Description: I need to use GItPython API to get annotated tags. If I do next: repo = git.Repo(repo_path) tags = repo.tags annotated_tags = [tag for tag in tags] I get list of lightweight tags. How do I get a li...
Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1937
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Get annotated tags","text":"I need to use GItPython API to get annotated tags. If I do next:
\nrepo = git.Repo(repo_path) tags = repo.tags annotated_tags = [tag for tag in tags]
\nI get list of lightweight tags. How do I get a list of annotated tags?
\nI need for annotated tags info: tag, tagger, tagged_date
\nThanks for any help
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Maybe this helps: https://chatgpt.com/share/b1010a46-8079-414e-89ab-da43b2af90b9 .
\nHere is a copy of the code it produced:
\nimport git\n\n# Path to your repository\nrepo_path = '/path/to/your/repo'\n\n# Initialize the Repo object\nrepo = git.Repo(repo_path)\n\n# Get all tags\nall_tags = repo.tags\n\n# Filter annotated tags\nannotated_tags = [tag for tag in all_tags if tag.tag is not None]\n\n# Print the annotated tags\nfor tag in annotated_tags:\n print(f\"Annotated Tag: {tag.name}\")\n print(f\"Tag Message: {tag.tag.message}\")\n print(f\"Tag Object: {tag.tag.object}\")
","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1937#discussioncomment-9961221"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:f8c92537-3277-a214-9e0d-528dde3bd120 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 99BA:25C698:EAEE1:13C2C1:6969663E |
| html-safe-nonce | 1bde2963b9710018a8e0f159b16e3883d7a6649bcb8d7a9f71814789cb5ed2a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUJBOjI1QzY5ODpFQUVFMToxM0MyQzE6Njk2OTY2M0UiLCJ2aXNpdG9yX2lkIjoiODgzMDc5NDE4NTIxMTUxMDM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6b2ddc23a08cb560edf07c04a053cda51d2a12725478de738905af1fba4a17e4 |
| hovercard-subject-tag | discussion:6898272 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1937/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/58f2229da8cb2143093130167ac6f093f895075944b27d54696a69f6c9b0f793/gitpython-developers/GitPython/discussions/1937 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58f2229da8cb2143093130167ac6f093f895075944b27d54696a69f6c9b0f793/gitpython-developers/GitPython/discussions/1937 |
| og:image:alt | I need to use GItPython API to get annotated tags. If I do next: repo = git.Repo(repo_path) tags = repo.tags annotated_tags = [tag for tag in tags] I get list of lightweight tags. How do I get a li... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width