forked from sigmavirus24/github3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag.py
More file actions
35 lines (27 loc) · 1.03 KB
/
tag.py
File metadata and controls
35 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""
github3.repos.tag
=================
This module contains the RepoTag object for GitHub's tag API.
"""
from __future__ import unicode_literals
from ..models import GitHubObject
class RepoTag(GitHubObject):
"""The :class:`RepoTag <RepoTag>` object. This stores the information
representing a tag that was created on a repository.
See also: http://developer.github.com/v3/repos/#list-tags
"""
def __init__(self, tag):
super(RepoTag, self).__init__(tag)
#: Name of the tag.
self.name = tag.get('name')
#: URL for the GitHub generated zipball associated with the tag.
self.zipball_url = tag.get('zipball_url')
#: URL for the GitHub generated tarball associated with the tag.
self.tarball_url = tag.get('tarball_url')
#: Dictionary containing the SHA and URL of the commit.
self.commit = tag.get('commit', {})
def _repr(self):
return '<Repository Tag [{0}]>'.format(self)
def __str__(self):
return self.name