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: patch-diff.githubusercontent.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:7a94e2aa-b75f-0636-edab-575dc9d15bee |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | CCD0:373703:20DDBA0:2D104D5:6973582B |
| html-safe-nonce | 8383ed834bd32d583d5aed65cf651ce930ef0d3f9b2b8dc94f97ec8fbb548f54 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0QwOjM3MzcwMzoyMEREQkEwOjJEMTA0RDU6Njk3MzU4MkIiLCJ2aXNpdG9yX2lkIjoiMTgxNjg1MTEwNTkwODQ4MDA0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5b318eb2742e5c1893e49698a0184369cd6ca0c2ba52363d6aa6ff804c9fb22a |
| 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 | 4cf879a11b0a28a85543899a36aaee9ec9ca2fb7bedad86c0da5731193c95f01 |
| 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 | 63c75712c8aa15b01c097cbf3f10ca694d449599 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width