GitHub App integration for Kiwi TCMS
Project description
Introduction
This package provides the GitHub App integration for Kiwi TCMS Enterprise and is designed to work only for multi-tenant environments! You don’t need this add-on in order to run Kiwi TCMS without extended GitHub integration!
Communication from GitHub to this plugin is via webhooks.
Plugin behavior:
Auto-configure which tenant to use for database operations, either ‘public’ or a single private tenant to which user has access.
If unable to auto-configure display warning and redirect to configuration page once the GitHub account who installed this integration onto their GitHub repository logs into Kiwi TCMS
Existing & newly created repositories are added as products in Kiwi TCMS. Fork repositories are skipped
Newly created git tags are added as product versions in Kiwi TCMS
See Issues for other ideas!
Installation
pip install kiwitcms-github-app
inside Kiwi TCMS’s docker image and make sure the following settings are configured:
AUTHENTICATION_BACKENDS = [ 'social_core.backends.github.GithubAppAuth', ... ] SOCIAL_AUTH_GITHUB_APP_KEY = 'xxxxxx' SOCIAL_AUTH_GITHUB_APP_SECRET = 'yyy' KIWI_GITHUB_APP_SECRET = b'your-webhook-secret'
everything else will be taken care for by Kiwi TCMS plugin loading code!
GitHub App configuration
This plugin needs an existing GitHub App application with the following configuration:
User authorization callback URL: https://tcms.example.com/complete/github-app/
Request user authorization (OAuth) during installation - True
Webhook Active - True
Webhook URL - https://tcms.example.com/kiwitcms_github_app/webhook/
Webhook Secret - <the value of KIWI_GITHUB_APP_SECRET>
SSL verification - Enabled
Then configure how the application interacts with GitHub:
Repository permissions:
Contents: Read-only
Metadata: Read-only
User permissions:
Email addresses: Read-only
Subscribe to events:
Meta
Create
Repository
Changelog
v1.0 (13 Apr 2020)
Install settings overrides under tcms_settings_dir/ (compatible with Kiwi TCMS v8.2 or later):
does not need MIDDLEWARE and PUBLIC_VIEWS override anymore
Remove GithubAppAuth backend, shipped with social-auth-core v3.3.0
Fix a redirect to use the correct name of our social_core backend
v0.0.5 (19 Feb 2020)
Address GitHub API deprecation not yet fixed in social-auth-core
v0.0.4 (25 Dec 2019)
Do not fail if product already exists
Do not fail if repository doesn’t have description
Search UserSocialAuth by uid and provider
v0.0.1 (24 Dec 2019)
initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kiwitcms_github_app-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f4e9e6512487a40cd241ab9486adb6e63d6f59284b12a21d9e080b9e5e8bdd |
|
MD5 | c4f6eef0ebeb137b897663dbabdf2fca |
|
BLAKE2b-256 | 17fa9729d01c0199d5edbd3c61a115e8daa574d6ba2e33e5fa176d30c60ddfc7 |