Skip to content

BurdaMagazinOrg/githubWebhooksMirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bbc8c59 · May 17, 2021

History

50 Commits
Dec 12, 2017
Feb 28, 2018
Jul 31, 2019
Jul 31, 2019
Dec 12, 2016
Feb 6, 2018
Jul 24, 2017
Dec 12, 2017
May 17, 2021
Mar 16, 2021
Jul 31, 2019

Repository files navigation

githubWebhooksMirror

How to install

  • Obtain a publicly accessible server
  • Add its public key to your github account
  • Make sure, that this server is authenticated to the server, where the github repo should be mirrored to
  • Upload the code from this repository
  • Make a new oauth app on github: https://github.com/settings/developers
    • as "Authorization callback URL" type http[s]://[your ip or domain]:[port where app will be running]/admin/auth/callback
  • Copy example.settings.json to settings.json and configure it with the data of your new app
  • start it up with node server.js or with pm2 (recommended)

How to use

  • Go to /admin
  • If it is the first time starting up, you have to create a user for basic auth
  • Afterwards you can click on Login with GitHub to log in. This will fetch all your repositories
  • Select the repository, you want to mirror and type the URL, where it should go (for Drupal e.g.: [email protected]:project/your_project.git)
  • Type in the branches, which should be mirrored, seperated by space
  • By clicking Add, the mirror will be configured, the webhook will be created for the selected repo and the initial mirror will be triggered
  • If you don't want to mirror a repo anymore, just click on the X in the top left of it. This will also remove the webhook