Exemplo n.º 1
0
 def say(self, opts):
     """[<msg>]
        Let the octocat speak to you"""
     msg = github3.octocat(opts['<msg>'] or None)
     if isinstance(msg, bytes):
         msg = msg.decode('utf-8')
     print(msg)
Exemplo n.º 2
0
 def say(self, opts):
     """[<msg>]
        Let the octocat speak to you"""
     msg = github3.octocat(opts['<msg>'] or None)
     if isinstance(msg, bytes):
         msg = msg.decode('utf-8')
     print(msg)
Exemplo n.º 3
0
 def say(self, opts):
     """[<msg>]
        Let the octocat speak to you"""
     print(github3.octocat(opts['<msg>'] or None))
Exemplo n.º 4
0
import github3

print("Hey Octocat!")
print(github3.octocat("Hey Ian!"))
print("What do you think about github3.py?")
print(github3.octocat("github3.py rocks!"))
print("Thanks Octocat, that means a lot coming from you.")
print("FIN.")
print("""Epilog:
    The preceding conversation was entirely fictional. If you didn't realize
    that, you need to get out more.
""")
Exemplo n.º 5
0
 def test_octocat(self):
     github3.octocat()
     assert self.gh.octocat.called is True
Exemplo n.º 6
0
 def test_octocat(self):
     """Show that github3.octocat proxies to GitHub."""
     github3.octocat()
     self.gh.octocat.assert_called_once_with(None)
Exemplo n.º 7
0
                    type=lambda d: datetime.datetime.strptime(d, '%Y-%m-%d'),
                    default=datetime.datetime.now() + datetime.timedelta(-90))
parser.add_argument('-e',
                    '--end-date',
                    required=False,
                    help='Start of data (e.g. 2017-09-13)',
                    type=lambda d: datetime.datetime.strptime(d, '%Y-%m-%d'),
                    default=datetime.datetime.now())
args = parser.parse_args()

# Connect to github
gh = github3.login(token=args.github_key)
repo = gh.repository('SEED-platform', 'seed')
internal_users = ['nllong', 'axelstudios', 'Myoldmopar', 'adrian-lara']

print(github3.octocat())
print("Connecting to GitHub repository: %s" % repo)


def add_issue(listobj, issue_type, issue):
    listobj.append({
        'type': issue_type,
        'number': issue.number,
        'title': issue.title,
        'url': issue.html_url,
    })


def add_pr(listobj, issue):
    listobj.append({
        'type': 'PR',
Exemplo n.º 8
0
 def say(self, opts):
     """[<msg>]
        Let the octocat speak to you"""
     print(github3.octocat(opts['<msg>'] or None))