This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
// run with groovy ListReposInOrg -t <personal access token> <org name> | |
package org.kohsuke.github | |
@Grab(group='org.kohsuke', module='github-api', version='1.75') | |
import org.kohsuke.github.GitHub | |
class ListReposInOrg extends GitHub { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# View abbreviated SHA, description, and history graph of the latest 20 commits | |
l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
# View the current working tree status using the short format | |
s = status -s | |
# Show the diff between the latest commit and the current state | |
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dashboard> | |
<label>Octodemo performance stats</label> | |
<row> | |
<panel> | |
<chart> | |
<title>Top fetched repos</title> | |
<search> | |
<query>index="octodemo" upload-pack user| top repo</query> | |
<earliest>@w0</earliest> | |
<latest>now</latest> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
OlderNewer