github
github
GitHub helper functions
Contributor related functions:
print_contributor_images
- Print contributor profile images for HTML web pagesget_repo_contributors
- Get a list of contributors to a GitHub repositoryget_user_info
- Get profile information about a GitHub userget_contrib_html
- Generates HTML for a GitHub contributor’s profile image and link
Functions
Name | Description |
---|---|
get_contrib_html | Generates HTML for a GitHub contributor’s profile image and link. |
get_repo_contributors | Get a list of contributors to a GitHub repository. |
get_user_info | Get profile information about a GitHub user. |
print_contributor_images | Print contributor profile images for HTML web pages |
get_contrib_html
='{width=100px height=100px}') github.get_contrib_html(contrib, img_attr
Generates HTML for a GitHub contributor’s profile image and link.
Parameters
Name | Type | Description | Default |
---|---|---|---|
contrib | dict | A dictionary containing contributor information. Expected keys are ‘login’, ‘avatar_url’, and ‘html_url’. | required |
Returns
Name | Type | Description |
---|---|---|
str | A string containing HTML that displays the contributor’s profile image and links to their GitHub profile. |
get_repo_contributors
='CCBR') github.get_repo_contributors(repo, org
Get a list of contributors to a GitHub repository.
Parameters
Name | Type | Description | Default |
---|---|---|---|
repo | str | The name of the repository. | required |
org | str | The organization name. Defaults to ‘CCBR’. | 'CCBR' |
Returns: list: A list of contributors to the specified repository.
get_user_info
github.get_user_info(user_login)
Get profile information about a GitHub user.
Parameters
Name | Type | Description | Default |
---|---|---|---|
user_login | str | The GitHub username of the user. | required |
Returns
Name | Type | Description |
---|---|---|
dict | A dictionary containing the user’s profile information. |
print_contributor_images
='CCBR') github.print_contributor_images(repo, org
Print contributor profile images for HTML web pages
Parameters
Name | Type | Description | Default |
---|---|---|---|
repo | str | The name of the GitHub repository. | required |
org | str | The GitHub organization or user that owns the repository. Defaults to ‘CCBR’. | 'CCBR' |
Returns
Name | Type | Description |
---|---|---|
None |