Skip to main content

GitHub App integration for Kiwi TCMS

Project description

https://travis-ci.org/kiwitcms/github-app.svg?branch=master https://coveralls.io/repos/github/kiwitcms/github-app/badge.svg?branch=master Python updates Tidelift Become a sponsor Kiwi TCMS on Twitter

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kiwitcms-github-app-1.0.tar.gz (23.3 kB view hashes)

Uploaded Source

Built Distribution

kiwitcms_github_app-1.0-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page