Skip to content

Instantly share code, notes, and snippets.

View Hollywood's full-sized avatar
🏠
Working from home

Jonathan Cardona Hollywood

🏠
Working from home
View GitHub Profile
@Hollywood
Hollywood / branches-and-commits-by-repository.graphql
Last active October 24, 2022 12:31
GraphQL Branch and Commit Queries by Repository
query getCommitsByBranchByRepo($org:String!,$repo:String!) {
organization(login:$org) {
name
repository(name:$repo) {
name
refs(refPrefix: "refs/heads/", first: 10) {
nodes {
id
name
target {
@Hollywood
Hollywood / branches-by-repository.graphql
Last active February 13, 2019 22:29
commits-by-branch-and-repository
query {
organization (login: "PUT_YOUR_ORG_HERE") {
repository (name: "PUT_YOUR_REPO_NAME_HERE") {
id
name
refs (refPrefix: "refs/heads/", first: 10) {
edges {
node {
id
name

pullrequest-by-org

{
  organization(login: "PUT_YOUR_ORG_HERE") {
    id
    name
    teams(first: 1) {
      edges {
        node {

Keybase proof

I hereby claim:

  • I am hollywood on github.
  • I am hollyw0od (https://keybase.io/hollyw0od) on keybase.
  • I have a public key whose fingerprint is 4394 76D2 62D1 7480 2C0B E648 B629 C944 E0F8 9C42

To claim this, I am signing this object:

Moving Git repositories to GitHub

  1. Ensure you have the repository cloned locally and that it is up to date.
    a. git clone <repo-address> if the repository is not locally available (the cd into the newly created directory). b. If you had it available and did not need to clone type git pull to make sure you have the most recent changes from origin (your current Git host) in your local repository.
  2. Create the destination repository on your GitHub Enterprise instance.
  3. Change the origin URL of your local repository to point to the new GitHub repository.
    a. git remote set-url origin <address-to-repo-here>
  4. Push the repository, with all branches, to GitHub Enterprise.
    a.git push origin "refs/remotes/origin/*:refs/heads/*"
@Hollywood
Hollywood / TogglingUsernameSetting.md
Last active November 3, 2017 20:56
Toggling Username Renaming

Steps to Toggle Turning On/Off the Option to Change Username in GHE

  1. SSH into your GitHub Enterprise instance.
  2. Run the GitHub Enterprise Console by typing the following:

ghe-console -y

  1. When in the console, type the following to change the username option:

GitHub.config.set("user_renaming_enabled", "false", dat("YOUR_USERNAME"))

@Hollywood
Hollywood / file1.txt
Created October 30, 2017 18:29
Created via API
Demo