flowbber.plugins.sources.github
¶This source collects pull requests and issues statistics from a GitHub repository using the GitHub API v3. This source requires a personal access token, you can create one in your settings. No particular scope is required.
Data collected:
{
"issue": {
"closed": 1,
"open": 2
},
"pr": {
"closed": 3,
"open": 4
}
}
Dependencies:
pip3 install flowbber[github]
Usage:
[[sources]]
type = "github"
id = "..."
[sources.config]
token = "abcdefabcdefabcdefabcdef"
repository = "organization/repository"
base_url = "https://api.github.com"
{
"sources": [
{
"type": "github",
"id": "...",
"config": {
"token": "abcdefabcdefabcdefabcdef",
"repository": "organization/repository",
"base_url": "https://api.github.com"
}
}
]
}
Personal access token to use to connect to the GitHub API. Keep this value safe and secret.
Default: N/A
Optional: False
Schema:
{
'type': 'string',
'empty': False,
}
Secret: True
Name of the repository to query for in the form organization/repository
.
Default: N/A
Optional: False
Schema:
{
'type': 'string',
'empty': False,
}
Secret: False
Base URL to connect to the GitHub v3 API.
For public GitHub, the default https://api.github.com
should be used.
For private GitHub Enterprise instances use
https://github.yourdomain.com/api/v3
or similar.
Default: https://api.github.com
Optional: True
Schema:
{
'type': 'string',
'empty': False,
}
Secret: False
GitHubSource
:
Main base class to implement a Source.flowbber.plugins.sources.github.
GitHubSource
(index, type_, id_, optional=False, timeout=None, config=None)¶Inheritance