-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
454 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check Examples Copy Folder Content | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check-folders: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Compare folders | ||
run: | | ||
shopt -s dotglob | ||
if ! diff -r examples/ cmd/examples-copy; then | ||
echo "Examples folder is not up to date. Please run 'make examples' and commit the changes." | ||
exit 1 | ||
fi |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# After Cloning | ||
|
||
A few ways to use ghorg after cloning repos. Please add yours below if you have one! | ||
|
||
## On Mac | ||
|
||
> Dump all test.sh files from ghorg dir into a results file | ||
``` | ||
find $HOME/ghorg -name "test.sh" -exec cat {} \; > results | ||
``` | ||
|
||
> Find any use of gcloud in a file called test.sh | ||
``` | ||
find $HOME/ghorg -name "test.sh" | xargs grep -i "gcloud" | ||
``` | ||
|
||
> Sort cloned repos by size | ||
``` | ||
# cd into a clone dir | ||
du -d 1 . | sort -nr | cut -f2- | xargs du -hs | ||
``` | ||
|
||
## On PC | ||
|
||
> Help Wanted | ||
## On Linux | ||
|
||
> Help Wanted |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Bitbucket Examples | ||
|
||
> Note: all command line arguments can be permanently set in your `$HOME/.config/ghorg/conf.yaml` for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the README.md. | ||
To view all additional flags see the [sample-conf.yaml](https://github.com/gabrie30/ghorg/blob/master/sample-conf.yaml) or use `ghorg clone --help` | ||
|
||
## Bitbucket Cloud | ||
|
||
1. Clone the microsoft workspace using an app-password | ||
|
||
``` | ||
ghorg clone microsoft --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password> | ||
``` | ||
1. Clone the microsoft workspace using oauth token | ||
``` | ||
ghorg clone microsoft --scm=bitbucket --token=<oauth-token> | ||
``` | ||
## Hosted Bitbucket | ||
1. Clone a workspace on a hosted bitbucket instance using an app-password | ||
``` | ||
ghorg clone <workspace> --scm=bitbucket --bitbucket-username=<your-username> --token=<app-password> --base-url=https://<api.myhostedbb.com>/v2 | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Gitea Examples | ||
|
||
> Note: all command line arguments can be permanently set in your `$HOME/.config/ghorg/conf.yaml` for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the README.md. | ||
To view all additional flags see the [sample-conf.yaml](https://github.com/gabrie30/ghorg/blob/master/sample-conf.yaml) or use `ghorg clone --help` | ||
|
||
1. Clone an **org** | ||
|
||
``` | ||
ghorg clone <gitea_org> --base-url=https://<your-internal-gitea>.com --token=XXXXXXX | ||
``` | ||
1. Clone a **users** repos | ||
``` | ||
ghorg clone <gitea_username> --clone-type=user --base-url=https://<your-internal-gitea>.com --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 | ||
``` | ||
1. Clone all repos from a **gitea org** that are **prefixed** with "frontend" **into a folder** called "design_only" | ||
``` | ||
ghorg clone <gitea_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-internal-gitea>.com --token=XXXXXXX | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# GitHub Examples | ||
|
||
> Note: all command line arguments can be permanently set in your `$HOME/.config/ghorg/conf.yaml` for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the README.md. | ||
To view all additional flags see the [sample-conf.yaml](https://github.com/gabrie30/ghorg/blob/master/sample-conf.yaml) or use `ghorg clone --help` | ||
|
||
## GitHub Cloud | ||
|
||
1. Clone an **org**, using a token on the commandline | ||
|
||
``` | ||
ghorg clone <github_org> --token=XXXXXX | ||
``` | ||
1. Clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only" | ||
``` | ||
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --token=XXXXXX | ||
``` | ||
1. Clone a **users** repos, assumes ghorg conf.yaml is setup with a token | ||
``` | ||
ghorg clone <github_username> --clone-type=user --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 | ||
``` | ||
## GitHub Enterprise | ||
1. Clone an **org** | ||
``` | ||
ghorg clone <github_org> --base-url=https://<your-hosted-github>.com --token=XXXXXX | ||
``` | ||
1. Clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only" | ||
``` | ||
ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-hosted-github>.com --token=XXXXXX | ||
``` | ||
1. Clone a **users** repos | ||
``` | ||
ghorg clone <github_username> --clone-type=user --base-url=https://<your-hosted-github>.com --token=XXXXXX | ||
``` |
Oops, something went wrong.