#!/usr/bin/python3
"""
This module lists 10 commits of given repositories given users commits,
a holberton backend interview question
"""
import requests
import sys


if __name__ == "__main__":
    req = requests.get('https://api.github.com/repos/{}/{}/commits'.format(
        sys.argv[2], sys.argv[1])).json()
    if req:
        for i, commit in enumerate(req):
            if i < 10:
                if isinstance(commit, dict):
                    print("{}: {}".format(
                        commit.get('sha'),
                        commit.get('commit').get('author').get('name')))
            else:
                break

c13b9c8d7951a2036f7eab739b23212bc5d528f1
<mask token>

<mask token>
if __name__ == '__main__':
    req = requests.get('https://api.github.com/repos/{}/{}/commits'.format(
        sys.argv[2], sys.argv[1])).json()
    if req:
        for i, commit in enumerate(req):
            if i < 10:
                if isinstance(commit, dict):
                    print('{}: {}'.format(commit.get('sha'), commit.get(
                        'commit').get('author').get('name')))
            else:
                break

<mask token>
import requests
import sys
if __name__ == '__main__':
    req = requests.get('https://api.github.com/repos/{}/{}/commits'.format(
        sys.argv[2], sys.argv[1])).json()
    if req:
        for i, commit in enumerate(req):
            if i < 10:
                if isinstance(commit, dict):
                    print('{}: {}'.format(commit.get('sha'), commit.get(
                        'commit').get('author').get('name')))
            else:
                break

#!/usr/bin/python3
"""
This module lists 10 commits of given repositories given users commits,
a holberton backend interview question
"""
import requests
import sys


if __name__ == "__main__":
    req = requests.get('https://api.github.com/repos/{}/{}/commits'.format(
        sys.argv[2], sys.argv[1])).json()
    if req:
        for i, commit in enumerate(req):
            if i < 10:
                if isinstance(commit, dict):
                    print("{}: {}".format(
                        commit.get('sha'),
                        commit.get('commit').get('author').get('name')))
            else:
                break
