Mastodon

github Migration

Source: octodex.github.com

Heute habe ich meine 27 git-Repositories auf github umgezogen. Ich habe mich entschlossen sie so einer größeren Öffentlichkeit zugänglich zu machen und als zusätzliches Backup auf meinem Server zu spiegeln.

Seit kurzem hat github seine neue API v3 veröffentlicht. Auf dieser aufbauend habe ich ein PHP Script geschrieben, welches meine existierenden Repositories bei github anlegt und migriert:

  1. Das Script in das Wurzelverzeichnis aller Repositories ablegen
  2. github Username und Passwort im Skript anpassen
  3. php github.php

Ein paar Features:

  • Es wird automatisch ein entsprechende github Remote im Repository hinzugefügt
  • Alle in der Datei gitweb.projects gelisteten Repositories werden als öffentlich markiert
  • Befindet sich im Repository eine Datei description wird deren Inhalt übernommen
  • Per Exclude-Filter können bestimmte Repositories ausgeschlossen werden

MantisBT SourceIntegration with GitHub

leetcode.net has written an excellent GitHub integration plugin for the Mantis BugTracker. It allows you to reference issues by their #id in your commit message. You can close an issue simple by adding „fixed #35“ in your git commit message.

Verknüpfung des Bugtracker Eintrags mit dem GitHub Commit

Unfortunatly there is only poor documentation for the GitHub integration. I also had some problems with the „MantisBT“ post commit hook on the GitHub repository configuration. So, I did some code analysis and added a „Post-Receive-URL“ to my GitHub repo:

http://<server>/<path_to_mantis>/plugin.php?page=Source/import&id=<repository_id>

GitHub Configuration

To allow remote imports of new commits, you have to set the following checkboxes and IP addresses in your MantisBT configuration.

MantisBT Configuration