Skip to content

Instantly share code, notes, and snippets.

:octocat:
@ home

Johannes Nicolai jonico

:octocat:
@ home
  • GitHub Staff
  • Potsdam
Block or report user

Report or block jonico

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MigrateRepositories.groovy
#!/usr/bin/env groovy
/**
* groovy script to migrate (export) GitHub.com repositories to GitHub Enterprise
*
* Automates steps in https://github.com/blog/2171-migrate-your-repositories-using-ghe-migrator
*
* Run 'groovy MigrateRepositories.groovy' to see the list of command line options
*
* First run may take some time as required dependencies have to get downloaded, then it should be quite fast
@jonico
jonico / notify_on_pr_assignments.coffee
Last active Jul 28, 2016
Hubot script that will send a direct message to any person that gets assigned to a pull request.
View notify_on_pr_assignments.coffee
# Description
# Hubot script that will send a direct message to any person that gets assigned to a pull request.
# This came out of a discussion where a customer received too many GitHub notifications and wanted something
# succinct for the pull request assignment event.
#
# Dependencies:
# This script was tested with the slack adapter.
# In order to make use of it, you would have to put into Hubot's script folder and setup a GitHub webhook that points to
# <hubot deployment url>/hubot-pr and is delivering at least the pull requests events of the repositories you are interested
#
View block_unsigned_commits.sh
#!/bin/bash
zero_commit="0000000000000000000000000000000000000000"
# we have to change the home directory of GPG
# as in the default environment, /root/.gnupg is not writeable
export GNUPGHOME=/tmp/
# Do not traverse over commits that are already in the repository
# (e.g. in a different branch)
View limit_repo_file_size.sh
#!/bin/bash
repoSize=`du -hsk | cut -f 1`
if [ $repoSize -gt "1500" ]; then
echo "Repository size is greater than 1500 kb : ${repoSize}"
exit 1
fi
@jonico
jonico / evaluate.groovy
Last active Jan 1, 2017
Evaluation script for InformatiCup2017 submissions
View evaluate.groovy
import java.io.File
categories = ["DEV", "HW", "OTHER", "EDU", "WEB", "DATA", "DOCS"] as Set
def readInDataSet (dataSetName, categoryToRepo, repositories) {
categories.each {
categoryToRepo[it]= [] as Set
}
count = 1;
@jonico
jonico / AuditUsers.groovy
Last active Jun 14, 2017
groovy script to show all repositories that can be accessed by given users on an GitHub Enterprise instance
View AuditUsers.groovy
#!/usr/bin/env groovy
/**
* groovy script to show all repositories that can be accessed by given users on an GitHub Enterprise instance
*
*
* Run 'groovy AuditUsers.groovy' to see the list of command line options
*
* First run may take some time as required dependencies have to get downloaded, then it should be quite fast
*
@jonico
jonico / ggg-ideas-for-constellation.md
Created Aug 28, 2017
GGG Ideas for constellations Munich
View ggg-ideas-for-constellation.md
  • feedback geo-mirroring & hot patching
  • GGG requirements letter
  • conan.io
@jonico
jonico / PrintRepoAccess.groovy
Created Jan 15, 2017
Who can access a given repo on a GitHub Enterprise instance?
View PrintRepoAccess.groovy
#!/usr/bin/env groovy
/**
* groovy script to show all users that can access a given repository in a GitHub Enterprise instance
*
*
* Run 'groovy PrintRepoAccess.groovy' to see the list of command line options
*
* First run may take some time as required dependencies have to get downloaded, then it should be quite fast
*
View ListUsersInOrganizations.groovy
#!/usr/bin/env groovy
package org.kohsuke.github
@Grab(group='org.kohsuke', module='github-api', version='1.75')
import org.kohsuke.github.GitHub
class ListUsersInOrganizations extends GitHub {
static void main(args) {
View ListUsersInOrg.groovy
#!/usr/bin/env groovy
package org.kohsuke.github
@Grab(group='org.kohsuke', module='github-api', version='1.75')
import org.kohsuke.github.GitHub
class ListUsersInOrg extends GitHub {
static void main(args) {
You can’t perform that action at this time.