git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Overview

Go Report Card gruntwork-io

Table of contents

Introduction

Overview

git-xargs CLI

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command. You give git-xargs:

  1. a script or a command to run
  2. a list of repos

and git-xargs will:

  1. clone each repo
  2. run your specified script or command against it
  3. commit any changes
  4. open pull requests
  5. provide a detailed report of everything that happened

For example, have you ever needed to add a particular file across many repos at once? Or to run a search and replace to change your company or product name across 150 repos with one command? What about upgrading Terraform modules to all use the latest syntax? How about adding a CI/CD configuration file, if it doesn't already exist, or modifying it in place if it does, but only on a subset of repositories you select? You can handle these use cases and many more with a single git-xargs command.

Example: writing a new file to every repo in your github organization

As an example, let's use git-xargs to create a new file in every repo:

git-xargs \
  --branch-name test-branch \
  --github-org <your-github-org> \
  --commit-message "Create hello-world.txt" \
  touch hello-world.txt

Here's what it looks like in action:

git-xargs to the rescue!

In this example, every repo in your org will have a new file named hello-world.txt written to it with the contents "Hello, World!". You'll then receive an easy-to-read printout of exactly what happened on STDOUT:

*****************************************************************
  GIT-XARGS RUN SUMMARY @ 2021-04-12 23:05:18.478435534 +0000 UTC
  Runtime in seconds: 4
*****************************************************************


COMMAND SUPPLIED

[touch hello-world.txt]

 REPOS SUPPLIED VIA --repos FILE FLAG
│────────────────────────│────────────────────────│
│ ORGANIZATION NAME (5)  │ URL                    │
│────────────────────────│────────────────────────│
│ zack-test-org          │ terraform-aws-asg      │
│ zack-test-org          │ terraform-aws-vpc      │
│ zack-test-org          │ terraform-aws-security │
│ zack-test-org          │ terraform-aws-eks      │
│ zack-test-org          │ circleci-test-1        │
│────────────────────────│────────────────────────│

 ALL REPOS THAT WERE TARGETED FOR PROCESSING AFTER FILTERING MISSING / MALFORMED REPOS
│───────────────────│────────────────────────────────────────────────────│
│ REPO NAME         │ REPO URL                                           │
│───────────────────│────────────────────────────────────────────────────│
│ terraform-aws-vpc │ https://github.com/zack-test-org/terraform-aws-vpc │
│ terraform-aws-eks │ https://github.com/zack-test-org/terraform-aws-eks │
│ circleci-test-1   │ https://github.com/zack-test-org/circleci-test-1   │
│───────────────────│────────────────────────────────────────────────────│


 REPOS THAT WERE SUCCESSFULLY CLONED TO THE LOCAL FILESYSTEM
│───────────────────│────────────────────────────────────────────────────│
│ REPO NAME         │ REPO URL                                           │
│───────────────────│────────────────────────────────────────────────────│
│ terraform-aws-eks │ https://github.com/zack-test-org/terraform-aws-eks │
│ circleci-test-1   │ https://github.com/zack-test-org/circleci-test-1   │
│ terraform-aws-vpc │ https://github.com/zack-test-org/terraform-aws-vpc │
│───────────────────│────────────────────────────────────────────────────│


 REPOS THAT SHOWED FILE CHANGES TO THEIR WORKING DIRECTORY FOLLOWING COMMAND EXECUTION
│───────────────────│────────────────────────────────────────────────────│
│ REPO NAME         │ REPO URL                                           │
│───────────────────│────────────────────────────────────────────────────│
│ terraform-aws-eks │ https://github.com/zack-test-org/terraform-aws-eks │
│ terraform-aws-vpc │ https://github.com/zack-test-org/terraform-aws-vpc │
│ circleci-test-1   │ https://github.com/zack-test-org/circleci-test-1   │
│───────────────────│────────────────────────────────────────────────────│


 REPOS THAT WERE SUPPLIED BY USER BUT DON'T EXIST (404'D) VIA GITHUB API
│────────────────────────│──────────│
│ REPO NAME              │ REPO URL │
│────────────────────────│──────────│
│ terraform-aws-asg      │          │
│ terraform-aws-security │          │
│────────────────────────│──────────│


 REPOS WHOSE SPECIFIED BRANCHES DID NOT EXIST ON THE REMOTE, AND SO WERE FIRST CREATED LOCALLY
│───────────────────│────────────────────────────────────────────────────│
│ REPO NAME         │ REPO URL                                           │
│───────────────────│────────────────────────────────────────────────────│
│ terraform-aws-eks │ https://github.com/zack-test-org/terraform-aws-eks │
│ terraform-aws-vpc │ https://github.com/zack-test-org/terraform-aws-vpc │
│ circleci-test-1   │ https://github.com/zack-test-org/circleci-test-1   │
│───────────────────│────────────────────────────────────────────────────│


*****************************************************
  PULL REQUESTS OPENED
*****************************************************
│───────────────────│────────────────────────────────────────────────────────────│
│ REPO NAME         │ PR URL                                                     │
│───────────────────│────────────────────────────────────────────────────────────│
│ circleci-test-1   │ https://github.com/zack-test-org/circleci-test-1/pull/82   │
│ terraform-aws-eks │ https://github.com/zack-test-org/terraform-aws-eks/pull/81 │
│ terraform-aws-vpc │ https://github.com/zack-test-org/terraform-aws-vpc/pull/77 │
│───────────────────│────────────────────────────────────────────────────────────│

Getting started

  1. Export a valid Github token. See the guide on Github personal access tokens for information on how to generate one. For example, on Linux or Mac, you'd run:

    export GITHUB_OAUTH_TOKEN=<your-secret-github-oauth-token>
  2. Download the correct binary for your platform. Visit the releases page and download the correct binary depending on your system. Save it to somewhere on your PATH, such as /usr/local/bin/git-xargs.

  3. Set execute permissions. For example, on Linux or Mac, you'd run:

    chmod u+x /usr/local/bin/git-xargs
  4. Check it's working. Run the version command to ensure everything is working properly:

    git-xargs --version
  5. Provide a script or command and target some repos. Here's a simple example of running the touch command in every repo in your Github organization. Follow the same pattern to start running your own scripts and commands against your own repos!

    git-xargs \
      --branch-name "test-branch" \
      --commit-message "Testing git-xargs" \
      --github-org <enter-your-github-org-name> \
      touch git-xargs-is-awesome.txt

Reference

How to supply commands or scripts to run

The API for git-xargs is:

git-xargs [-flags] <CMD>

Where CMD is either the full path to a (Bash, Python, Ruby) etc script on your local system or a binary. Note that, because the tool supports Bash scripts, Ruby scripts, Python scripts, etc, you must include the full filename for any given script, including its file extension.

In other words, all the following usages are valid:

git-xargs --repo --repo gruntwork-io/cloud-nuke \
   --repo gruntwork-io/terraform-aws-eks \
   --branch-name my-branch \
   /usr/local/bin/my-bash-script.sh
git-xargs --repos ./my-repos.txt \
  --branch-name my-other-branch \
  touch file1.txt file2.txt
git-xargs --github-org my-github-org \ 
  --branch-name my-new-branch \
  "$(pwd)/scripts/my-ruby-script.rb"

Branch behavior

Passing the --branch-name (-b) flag is required when running git-xargs. If you specify the name of a branch that exists on your remote, its latest changes will be pulled locally prior to your command or script being run. If you specify the name of a new branch that does not yet exist on your remote, it will be created locally and pushed once your changes are committed.

Git file staging behavior

Currently, git-xargs will find and add any and all new files, as well as any existing files that were modified, within your repo and stage them prior to committing. If your script or command creates a new file, it will be committed. If your script or command edits an existing file, that change will also be committed.

Paths and script locations

Scripts may be placed anywhere on your system, but you are responsible for providing absolute paths to your scripts when invoking git-xargs:

git-xargs \
  --branch-name upgrade-tf-14 \
  --commit-message "Update modules to Terraform 0.14" \
  --repos data/batch3.txt \
  $(pwd)/scripts/my-ruby-script.rb

or

git-xargs \
  --branch-name upgrade-tf-14 \
  --commit-message "Update modules to Terraform 0.14" \
  --repos data/batch3.txt \
  /usr/local/bin/my-ruby-script.rb

If you need to compose more complex behavior into a single pull request, write a wrapper script that executes all your commands, or place all your logic into one script.

How to target repos to run your scripts against

git-xargs supports four methods of targeting repos to run your selected scripts against. They are processed in the order listed below, with whichever option is found first being used, and all others after it being ignored.

Option #1: Github organization lookup

If you want the tool to find and select every repo in your Github organization, you can pass the name of your organization via the --github-org flag:

git-xargs \
  --commit-message "Update copyright year" \
  --github-org <your-github-org> \ 
  "$(pwd)/scripts/update-copyright-year.sh"

This will signal the tool to look up, and page through, every repository in your Github organization and execute the scripts you passed via the --scripts flag.

Option #2: Flat file of repository names

Oftentimes, you want finer-grained control over the exact repos you are going to run your script against. In this case, you can use the --repos flag and supply the path to a file defining the exact repos you want the tool to run your selected scripts against, like so:

git-xargs \
  --commit-mesage "Update copyright year" \
  --repos data/batch2.txt \
  "$(pwd)/scripts/update-copyright-year.sh"

In this example, batch2.txt looks like this:

gruntwork-io/infrastructure-as-code-training
gruntwork-io/infrastructure-live-acme
gruntwork-io/infrastructure-live-multi-account-acme
gruntwork-io/infrastructure-modules-acme
gruntwork-io/infrastructure-modules-multi-account-acme

Flat files contain one repo per line, each repository in the format of <github-organization>/<repo-name>. Commas, trailing or preceding spaces, and quotes are all filtered out at runtime. This is done in case you end up copying your repo list from a JSON list or CSV file.

Option #3: Pass in repos via command line args

Another way to get fine-grained control is to pass in the individual repos you want to use via one or more --repo arguments:

git-xargs \
  --commit-mesage "Update copyright year" \
  --repo gruntwork-io/terragrunt \
  --repo gruntwork-io/terratest \
  --repo gruntwork-io/cloud-nuke \
  "$(pwd)/scripts/update-copyright-year.sh"

Option #4: Pass in repos via stdin

And one more (Unix-philosophy friendly) way to get fine-grained control is to pass in the individual repos you want to use by piping them in via stdin, separating repo names with whitespace or newlines:

echo "gruntwork-io/terragrunt gruntwork-io/terratest" | git-xargs \
  --commit-mesage "Update copyright year" \
  "$(pwd)/scripts/update-copyright-year.sh"

Notable flags

git-xargs exposes several flags that allow you to customize its behavior to better suit your needs. For the latest info on flags, you should run git-xargs --help. However, a couple of the flags are worth explaining more in depth here:

Flag Description Type Required
--branch-name You must specify the name of the branch to make your local and remote changes on. You can further control branching behavior via --skip-pull-requests as explained below String Yes
--repos If you want to specify many repos and manage them in files (which makes batching and testing easier) then use this flag to pass the filepath to a repos file. See the repos file format for more information String No
--repo Use this flag to specify a single repo, e.g., --repo gruntwork-io/cloud-nuke. Can be passed multiple times to target several repos String No
--github-org If you want to target every repo in a Github org that your GITHUB_OAUTH_TOKEN has access to, pass the name of the Organization with this flag, to page through every repo via the Github API and target it String No
--commit-message The commit message to use when creating commits. If you supply this flag, but neither the optional --pull-request-title or --pull-request-description flags, then the commit message value will be used for all three. String No
--skip-pull-requests If you don't want any pull requests opened, but would rather have your changes committed directly to your specified branch, pass this flag. Note that it won't work if your Github repo is configured with branch protections on the branch you're trying to commit directly to! Boolean No
--dry-run If you are in the process of testing out git-xargs or your intial set of targeted repos, but you don't want to make any changes via the Github API (pushing your local changes or opening pull requests) you can pass the dry-run branch. This is useful because the output report will still tell you which repos would have been affected, without actually making changes via the Github API to your remote repositories. Boolean No

Best practices, tips and tricks

Write your script to run against a single repo

Write your script as if its operating on a single repo, then target many repos with git-xargs. Remember that at runtime, each of the scripts you select will be run, in the order you specify, once per repo that you've targeted.

Handling prerequisites and third party binaries

It is currently assumed that bash script authors will be responsible for checking for prequisites within their own scripts. If you are adding a new bash script to accomplish some new task across repos, consider using the Gruntwork bash-commons assert_is_installed pattern to ensure the operator has any required binaries installed.

Grouping your repos into separate batches

This is a pattern that ended up working out well for us as we wrote and executed more and more ambitious scripts across our many repos as a team: By breaking your target repos into separate batches, (batch1.txt, batch2.txt, batch3.txt) and starting with a few repos (or even one repo!) in the initial batches, and then gradually expanding the batches in size, you can easily test your new scripts against a few repos and double check the generated pull requests for any issues prior to widening your target batches.

How git-xargs works

This section provides a more in-depth look at how the git-xargs tool works under the hood.

  1. git-xargs will clone each of your selected repos to your machine to the /tmp/ directory of your local machine. The name of each repo, plus a random number each run, are concatenated together to form the local clone name to make the local repo easier to find in case you need to debug your script locally, e.g., terraform-aws-module-security3978298.
  2. it will checkout a local branch (whose name you can optionally specify with the --branch-name flag)
  3. it will run all your selected scripts against your selected repos 
  4. it will commit any changes in each of the repos (with a commit message you can optionally specify via the --commit-message flag)
  5. it will push your local branch with your new commits to your repo's remote 
  6. it will call the Github API to open a pull request with a title and description that you can optionally specify via the --pull-request-title and --pull-request-description flags, respectively), unless you pass the --skip-pull-requests flag
  7. it will print out a detailed run summary to STDOUT that explains exactly what happened with each repo and provide links to successfully opened pull requests that you can quickly follow from your terminal. If any repos encountered errors at runtime (whether they weren't able to be cloned, or script errors were encountered during processing, etc) all of this will be spelled out in detail in the final report so you know exactly what succeeded and what went wrong.

Tasks this tool is well-suited for

The following is a non-exhaustive list of potential use cases for git-xargs:

  • Add a LICENSE file to all of your GitHub repos, interpolating the correct year and company name into the file
  • For every existing LICENSE file across all your repos, update their copyright date to the current year
  • Update the CI build configuration in all of your repos by modifying the .circleci/config.yml file in each repo using a tool such as yq
  • Run sed commands to update or replace information across README files
  • Add new files to repos
  • Delete specific files, when present, from repos
  • Modify package.json files in-place across repos to bump a node.js dependency using jq https://stedolan.github.io/jq/
  • Update your Terraform module library from Terraform 0.13 to 0.14 . 
  • Remove stray files of any kind, when found, across repos using find and its exec option
  • Add baseline tests to repos that are missing them by copying over a common local folder where they are defined
  • Refactor multiple Golang tools to use new libraries by executing go get to install and uninstall packages, and modify the source code files' import references

If you can instrument the logic in a script, you can use git-xargs to run it across your repos!

Contributing

Contributing scripts to this project

We hope that this tool will help save you some time as you apply it to your own automations and maintenance tasks. We also welcome the community to contribute back scripts that everyone can use and benefit from.

Initially, we'll add these scripts to the ./scripts directory in this repository and will eventually organize them into sub-folders depending on their purposes / use cases. If you would like to have your script considered for inclusion in this repo, please first ensure that it is:

  • High quality: meaning free of typos, any obvious bugs or security issues
  • Generic: meaning that it is likely to be of general use to many different people and organizations, and free of any proprietary tooling or secrets

Once you've done this, please feel free to open a pull request adding your script to the ./scripts directory for consideration.

Thanks for contributing back! Our hope is that eventually this repo will contain many useful generic scripts for common maintenance and upgrading tasks that everyone can leverage to save time.

Running the tool without building the binary

Alternatively, you can run the tool directly without building the binary, like so:

./go run main.go \
  --branch-name test-branch \
  --commit-message "Add MIT License" \
  --repos data/test-repos.txt \
  $(pwd)/scripts/add-license.sh

This is especially helpful if you are developing against the tool and want to quickly verify your changes.

Running tests

Tests are included under the /cmd directory. There is a mixture of unit tests as well as CLI interface tests that verify certain flags are required, error messages are returned as expected when invalid input is provided, etc.

go test -v ./cmd

License

This code is released under the Apache 2.0 License. See LICENSE.txt

Comments
  • Implement rate-limit-aware http transport

    Implement rate-limit-aware http transport

    Description

    In the excellent bug report #59, @mkowaliszyn-coursera points out that git-xargs should respect the Github API's rate-limit headers, and I agree. This approach was very heavily "inspired" by howterraform-provider-github handles the exact same issue.

    These changes implement a rate-limit-aware HTTP transport that:

    1. Sleeps 1 second in between API calls made on behalf of the same client, thereby following the guidelines specified in Github's best practices for integrators doc
    2. Inspects Github API responses' Retry-After header when rate-limited, sleeping for the number of seconds specified by the same

    These changes also configure git-xarg's Github API client to use the rate-limit-aware http transport.

    Fixes #59

    Documentation

    TODOs

    Please ensure all of these TODOs are completed before asking for a review.

    • [x] Ensure the branch is named correctly with the issue number. e.g: feature/new-vpc-endpoints-955 or bug/missing-count-param-434.
    • [x] Update the docs.
    • [x] Keep the changes backward compatible where possible.
    • [x] Run the pre-commit checks successfully.
    • [x] Run the relevant tests successfully.
    • [x] Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.

    Related Issues

    opened by zackproser 19
  • Refactor project layout for better go build and get ergonomics

    Refactor project layout for better go build and get ergonomics

    Fixes https://github.com/gruntwork-io/git-xargs/issues/18 Fixes #7

    @mmlb Please have a look and let me know if this is what you had in mind. Thanks!

    Updates project layout which will allow for installing git-xargs with a single call to go get github.com/gruntwork-io/git-xargs.

    opened by zackproser 14
  • Does git-xargs support only 10 PRs?

    Does git-xargs support only 10 PRs?

    Describe the bug Using git-xargs with 10+ repositories, I end up with only 10 PRs (consistently between runs, I tried running the command multiple times)

    To Reproduce Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used. Running the git-xargs command with default settings produces only 10 PRs. For example I ran the following:

    git-xargs \
      --repos $PWD/tools/git-xargs/dbt_v1/repos \
      --branch-name branch-name-here \
      --loglevel DEBUG \
      --commit-message "My Commit Message" \
      --pull-request-description "DESCRIPTION HERE" \
      --draft \
      --dry-run \
      -- $PWD/tools/git-xargs/dbt_v1/script.sh
    

    The output looks like this:

    REPOS AGAINST WHICH PULL REQUESTS FAILED TO BE OPENED │──────────────────────────────│────────────────────────────────────────────────────────────│ │ REPO NAME │ REPO URL │ │──────────────────────────────│────────────────────────────────────────────────────────────│ │ my-11th-repo │ my-11th-repo-url │ │──────────────────────────────│────────────────────────────────────────────────────────────│

    REPOS WHOSE SPECIFIED BRANCHES DID NOT EXIST ON THE REMOTE, AND SO WERE FIRST CREATED LOCALLY │──────────────────────────────────────│────────────────────────────────────────────────────────────────────│ │ REPO NAME (11) │ REPO URL │ │──────────────────────────────────────│────────────────────────────────────────────────────────────────────│ ...I omitted content here... │──────────────────────────────────────│────────────────────────────────────────────────────────────────────│


    PULL REQUESTS OPENED


    │──────────────────────────────────────│────────────────────────────────────────────────────────────────────────────│ │ REPO NAME (10) │ PR URL │ │──────────────────────────────────────│────────────────────────────────────────────────────────────────────────────│ ...I omitted content here... │──────────────────────────────────────│────────────────────────────────────────────────────────────────────────────│

    // paste code snippets here
    

    Expected behavior I'm expecting 10+ PRs to be created, however only 10 were created. I can see that on the 11th repository a branch was created with the right content, however no PR.

    Can it be related to the tool itself or a policy I have in my organization?

    Nice to have

    • [ ] Terminal output
    • [ ] Screenshots

    Additional context Add any other context about the problem here.

    THANKS!!! Eyal

    bug 
    opened by peleyal 8
  • feat: Add --draft flag for draft pull requests

    feat: Add --draft flag for draft pull requests

    Hey folks, thanks for the neat tool!

    My team is interested in using the GitHub drafts feature so I've implemented a --draft flag here.

    I played around with a few tests but I didn't find one that felt like it provided meaningful coverage. What we want I think is a test where we check that the PR submitted to client.PullRequests.Create has the has Draft: true, which would require some storage structure on the mock used in perhaps another test like TestProcessRepo. This did seem like a lot for a flag, so wanted to see what you thought before adding it. Open to any suggestions for testing approaches!

    Also looks like my editor removed a couple extra spaces, please let me know if you'd like them reverted.

    closes #47

    opened by ryanwholey 8
  • Add reviewers to pull request

    Add reviewers to pull request

    It would be great if I could add reviewers (teams and single persons) to the pull request git-xargs opens. This way my reviewers will automatically see their pull requests.

    https://docs.github.com/en/rest/reference/pulls#request-reviewers-for-a-pull-request

    opened by radicarl 7
  • Pull request body validation error

    Pull request body validation error

    DEBU[0010] Successfully pushed local branch to remote origin  Repo=terraform-aws-architecture-catalog
    DEBU[0011] Error opening Pull request                    Base=master Body="_**This PR was created by git-xargs. See https://github.com/gruntwork-io/prototypes/pull/152 for context.**_ We recently renamed all of our repos to follow the Terraform registry format of  (e.g., ). This PR does a search & replace to update all references to these repos to the new names. GitHub can handle redirects, so in theory, everything should work fine with the old names, but there were so many renames, that to reduce confusion, this will update most of our references to the proper values." Error="POST https://api.github.com/repos/gruntwork-io/terraform-aws-architecture-catalog/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Head=refs/heads/rename-repos
    DEBU[0011] Error encountered while processing repo       Error="POST https://api.github.com/repos/gruntwork-io/terraform-aws-architecture-catalog/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Repo name=terraform-aws-architecture-catalog
    
    
    bug needs design 
    opened by zackproser 7
  • Implement buffered channel for pull requests

    Implement buffered channel for pull requests

    Description

    Fixes #59

    This PR addresses #59 by implementing several new features and flags to help us respect GitHub's API rate limits when using git-xargs:

    • Distinct processing channels for expensive and non-expensive work
    • Automatic, and configurable, pull request retries when rate limited
    • Automatic, and configurable, backoff when rate limiting is detected
    • Making the pause between pull requests configurable

    In addition, three new flags to assist with configuring your git-xargs jobs so that they do not trip GitHub rate limits:

    • --seconds-between-prs The number of seconds to wait between pull requests when serially opening them at the end of a run. In local testing, setting this value to 12 seconds resolves the secondary rate limiting issues seen reliably on the same test data set prior to making these changes.
    • --seconds-to-wait-when-ratelmited The number of seconds to wait when git-xargs detects it has been rate limited
    • --max-pr-retries The number of times to retry a failed pull request before abandoning it

    TODOs

    Please ensure all of these TODOs are completed before asking for a review.

    • [x] Ensure the branch is named correctly with the issue number. e.g: feature/new-vpc-endpoints-955 or bug/missing-count-param-434.
    • [x] Update the docs.
    • [x] Keep the changes backward compatible where possible.
    • [x] Run the pre-commit checks successfully.
    • [x] Run the relevant tests successfully.

    Related Issues

    opened by zackproser 6
  • Don't try to open PR if one is already open

    Don't try to open PR if one is already open

    Fixes #32.

    Key changes:

    1. Check if a PR already exists for a given branch before trying to open up a new one.
    2. Refactor the code a bit into a updateRepo method so that if the working tree reports itself as clean, we don't try to commit, push, or open a PR at all.
    opened by brikis98 5
  • No PR opened, if branch is up to date

    No PR opened, if branch is up to date

    Hello,

    found something which is probably a bug or at least unexpected behavior.

    If, for some reason the changes I made with git-xargs exists already in the branch on github, the tool prints the following errors and does not open a PR.

    [git-xargs] DEBU[2021-04-27T08:45:41+02:00] Error pushing new branch to remote origin     Error="already up-to-date" Repo=room-management-example
    [git-xargs] DEBU[2021-04-27T08:45:41+02:00] Error encountered while processing repo       Error="already up-to-date" Repo name=room-management-example
    

    I run into this error, because I run my git-xargs command two times. The first time I run into an error on opening the PR. After fixing this, I run the command a second time and failed on the update. I had to delete the remote branch first. I think it the tool should not break on an "already up-to-date" message, because the state of the repository is like it should be, only the way to achived was different.

    Think this is an edge case and nothing urgent.

    bug 
    opened by radicarl 5
  • 0.0.15 no longer creates PRs.

    0.0.15 no longer creates PRs.

    Describe the bug The latest version, 0.0.15, no longer creates PRs. I tried same command with 0.0.14 binary and it works fine.

    To Reproduce Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used.

    	./git-xargs   --branch-name mkow-test4  --repos ./java-apps.txt   --commit-message "My message"   --pull-request-title "My title"   --loglevel DEBUG   `pwd`/scripts/myScript.sh
    

    Expected behavior The PR should be created.

    Nice to have

    • [x] Terminal output
    • [ ] Screenshots

    Additional context Add any other context about the problem here.

    Teminal output:

    $ git-xargs   --branch-name mkow-test2  --repos ./java-apps.txt   --commit-message "My message"   --pull-request-title "My title"   --loglevel DEBUG   ***/updateServiceInfra.sh
    [git-xargs] INFO[2022-06-23T14:48:59-04:00] git-xargs running...
    [git-xargs] DEBU[2022-06-23T14:48:59-04:00] Looking up filename provided repo             Name=cplus-messaging-application Organization=****
    [git-xargs] DEBU[2022-06-23T14:48:59-04:00] Successfully fetched repo                     Name=cplus-messaging-application Organization=***
    [git-xargs] DEBU[2022-06-23T14:48:59-04:00] Repo will have all targeted scripts run against it  Repository=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:48:59-04:00] Attempting to clone repository using GITHUB_OAUTH_TOKEN  Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:00-04:00] Enumerating objects: 951, done.
    Counting objects: 100% (130/130), done.
    Compressing objects: 100% (78/78), done.
    Total 951 (delta 44), reused 106 (delta 28), pack-reused 821  Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:00-04:00] Created branch                                Branch Name=refs/heads/mkow-test2 Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:00-04:00]                                               Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:01-04:00] Executing command against local clone of repo...  Command="[***updateServiceInfra.sh]" Directory=***/workspace/git-xargs-cplus-messaging-application1237588432 Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:31-04:00] Output of command [***/scripts/updateServiceInfra.sh] for repo cplus-messaging-application in directory ***/workspace/git-xargs-cplus-messaging-application1237588432:
    [git-xargs] DEBU[2022-06-23T14:49:31-04:00] Local repository worktree no longer clean, will stage and add new files and commit changes  Repo=cplus-messaging-application
    [git-xargs] DEBU[2022-06-23T14:49:32-04:00] Successfully pushed local branch to remote origin  Repo=cplus-messaging-application
    [git-xargs] INFO[2022-06-23T14:49:32-04:00] Repository successfully processed             Repo name=cplus-messaging-application
    
    
    *****************************************************************
      GIT-XARGS RUN SUMMARY @ 2022-06-23 18:49:32.233789 +0000 UTC
      Runtime in seconds: 32
    *****************************************************************
    
    
    COMMAND SUPPLIED
    
    [/***/updateServiceInfra.sh]
    
    REPO SELECTION METHOD USED FOR THIS RUN - (see README.md for more information)
    
    repos-file
     REPOS SUPPLIED VIA --repos FILE FLAG
    │───────────────────│─────────────────────────────│
    │ ORGANIZATION NAME │ URL                         │
    │───────────────────│─────────────────────────────│
    │ ***      │ cplus-messaging-application │
    │───────────────────│──────────────────[git-xargs] DEBU[2022-06-23T14:49:32-04:00] pullRequestWorker received pull request job. Delay: 0 seconds. Retries: 0 for repo: cplus-messaging-application on branch: refs/heads/mkow-test2
    [git-xargs] DEBU[2022-06-23T14:49:32-04:00] openPullRequest received job with retries: 0. Config max retries for this run: 3
    ───────────│
    
     ALL REPOS THAT WERE TARGETED FOR PROCESSING AFTER FILTERING MISSING / MALFORMED REPOS
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ REPO NAME                   │ REPO URL                                                    │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ cplus-messaging-application │ https://***/cplus-messaging-application │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    
    
     REPOS THAT WERE SUCCESSFULLY CLONED TO THE LOCAL FILESYSTEM
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ REPO NAME                   │ REPO URL                                                    │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ cplus-messaging-application │ https://***/cplus-messaging-application │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    
    
     REPOS THAT SHOWED FILE CHANGES TO THEIR WORKING DIRECTORY FOLLOWING COMMAND EXECUTION
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ REPO NAME                   │ REPO URL                                                    │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ cplus-messaging-application │ https://***/cplus-messaging-application │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    
    
     REPOS WHOSE SPECIFIED BRANCHES DID NOT EXIST ON THE REMOTE, AND SO WERE FIRST CREATED LOCALLY
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ REPO NAME                   │ REPO URL                                                    │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    │ cplus-messaging-application │ https://***/cplus-messaging-application │
    │─────────────────────────────│─────────────────────────────────────────────────────────────│
    

    Note the async log output from the PR creation thread in the report.

    bug 
    opened by mkowaliszyn-coursera 4
  • Support for overriding base branch names

    Support for overriding base branch names

    Support overriding base branch name (Follow up to https://github.com/gruntwork-io/git-xargs/issues/22)

    Description

    Since our git workflow uses multiple branches of the same repository in some places, I thought it would make sense to support an optional argument for overriding the base branch name globally (might be an addition to #22).

    Documentation

    • README
    • --base-branch-name=<xxx>

    TODOs

    Please ensure all of these TODOs are completed before asking for a review.

    • [x] Ensure the branch is named correctly with the issue number. e.g: feature/new-vpc-endpoints-955 or bug/missing-count-param-434.
    • [x] Update the docs.
    • [x] Keep the changes backward compatible where possible.
    • [ ] Run the pre-commit checks successfully.
    • [ ] Run the relevant tests successfully.

    Related Issues

    #22

    opened by nirnanaaa 4
  • Simplify re-running on repos that failed

    Simplify re-running on repos that failed

    Describe the solution you'd like

    Optionally write all the failed to update repos to a .txt file in the format that git-xargs --repos accepts.

    Describe alternatives you've considered

    In the process of updating about 2500 repos I ran into multiple errors and had to re-run git-xargs multiple times, and the process looked like this:

    1. run git-xargs redirecting stdout / stderr to a file
    2. copy the tables following text like "Repos whose initial Pull Request failed to be created due to GitHub rate limits" or "Repos that were unable to be cloned to the local filesystem" etc. to a txt file
    3. run a vim macro to remove the table formatting (e.g. ------) so that it is in a format that git-xargs --repos can accept
    4. re-run git-xargs with --repos arg pointing to that manually created file, and repeat steps 1-4 until all repos successfully processed or intentionally skipped

    Ideally there wouldn't be any errors, but with so many repos that might be impractical, and the errors could also be user-error based on the command passed to git-xargs. A more efficient user experience might be the following:

    a) run git-xargs redirecting stdout / stderr to a file and the option --failed-repo-output-file /tmp/failed_to_update_repos.txt b) review stdout / stderr and remove any repos from /tmp/failed_to_update_repos.txt that you intentionally don't want to retry c) run git-xargs with --repos /tmp/failed_to_update_repos.txt and --failed-repo-output-file /tmp/failed_to_update_repos2.txt etc. (and it might be good to support --repos and --failed-repo-output-file pointing to the same file)

    enhancement 
    opened by jdimatteo 0
  • Feature Request: Add option to change clone depth

    Feature Request: Add option to change clone depth

    Describe the solution you'd like I would like a new --clone-depth CLI flag added, to be passed to cloneLocalRepository's git.CloneOptions.

    Describe alternatives you've considered I also considered keeping the repositories cloned in a static non-temporary directory for faster batch operations across several repos which would be faster, but this seems easier to implement.

    Additional context This would speed up running git-xargs in our org tremendously. We have ~180 repos, only a few archived but a --dry-run --skip-archived-repos with just echo hi as the script still takes 12 minutes, presumably due to large git histories with non-LFS binary data.

    enhancement 
    opened by xaviergmail 0
  • Add support for GH enterprise

    Add support for GH enterprise

    Description

    Add support for Github Enterprise usage.

    I needed something like this and I saw that the project had an issue to make this happen.

    So I wanted to propose a quick Pr and get feedback on what you expect from the PR Some questions

    • Should I add tests at this integration level?
    • Any specific docs I should be aware of updating?

    Relates #5

    TODOs

    • Change the branch to the expected format
    • Add tests as required in this PR
    • Update docs

    Read the Gruntwork contribution guidelines.

    • [ ] Update the docs.
    • [ ] Run the relevant tests successfully, including pre-commit checks.
    • [ ] Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
    • [ ] Include release notes. If this PR is backward incompatible, include a migration guide.

    Release Notes (draft)

    Added support for github enterprise

    Migration Guide

    opened by naxhh 1
  • Improve handling of Clone Repositories into temporary folders

    Improve handling of Clone Repositories into temporary folders

    Describe the solution you'd like

    Currently, each run of git-xargs clones the desired repository into the system's temporary folder. This is true for each time you target a repository running git-xargs.

    Here is an example from my machine after experiencing with git-xargs for a couple of days (MacOS 12.5.1):

    Command output
    ➜  ~ cd $TMPDIR
    Time: 0h:00m:00s
    ➜ T find . -type d -name 'git-xargs-*' -exec du -h -d 0 {} + | sort -hr
     80M	./git-xargs-dgx-common-log-streaming678032190
     80M	./git-xargs-dgx-common-log-streaming597087740
     80M	./git-xargs-dgx-common-log-streaming3198864778
     80M	./git-xargs-dgx-common-log-streaming2148875932
     79M	./git-xargs-dgx-common-log-streaming3263876230
     12M	./git-xargs-dgx-myaccount-identity-service1007138129
     11M	./git-xargs-dgx-myaccount-identity-service3008335785
     11M	./git-xargs-dgx-myaccount-identity-service2989643188
     11M	./git-xargs-dgx-myaccount-identity-service2504143130
     11M	./git-xargs-dgx-myaccount-identity-service2399128272
     11M	./git-xargs-dgx-model-search-etl3961058151
     11M	./git-xargs-dgx-model-search-etl3462385865
     11M	./git-xargs-dgx-model-search-etl1808882054
     11M	./git-xargs-dgx-model-search-etl1631063994
     10M	./git-xargs-dgx-model-search-etl4110192775
    6.4M	./git-xargs-dgx-myaccount-dashboard-service3331515564
    6.4M	./git-xargs-dgx-myaccount-dashboard-service2927083683
    6.4M	./git-xargs-dgx-monthlycare-service3226756721
    6.2M	./git-xargs-dgx-monthlycare-service1085377643
    6.0M	./git-xargs-dgx-pr-service2396586343
    6.0M	./git-xargs-dgx-myaccount-dashboard-service522882412
    5.7M	./git-xargs-dgx-monthlycare-service3608353224
    5.7M	./git-xargs-dgx-monthlycare-service1697101609
    5.7M	./git-xargs-dgx-monthlycare-service136264569
    5.5M	./git-xargs-dgx-myaccount-dashboard-service762928531
    5.5M	./git-xargs-dgx-myaccount-dashboard-service4145730298
    5.5M	./git-xargs-dgx-myaccount-dashboard-service3958640074
    5.5M	./git-xargs-dgx-myaccount-dashboard-service3647061136
    5.0M	./git-xargs-dgx-pr-service538758956
    5.0M	./git-xargs-dgx-pr-service461586568
    5.0M	./git-xargs-dgx-pr-service3223152605
    5.0M	./git-xargs-dgx-pr-service2447754502
    4.8M	./git-xargs-dgx-common-services1332210037
    4.6M	./git-xargs-dgx-claims-service1042501635
    4.3M	./git-xargs-dgx-devops-serverless3712677518
    4.3M	./git-xargs-dgx-devops-serverless1130242960
    4.3M	./git-xargs-dgx-common-esb-service76139217
    4.3M	./git-xargs-dgx-common-esb-service420185571
    4.3M	./git-xargs-dgx-common-esb-service2481447801
    4.3M	./git-xargs-dgx-common-esb-service2163038516
    4.3M	./git-xargs-dgx-common-esb-service1819556725
    4.2M	./git-xargs-dgx-devops-serverless492669529
    4.2M	./git-xargs-dgx-devops-serverless4002798199
    4.2M	./git-xargs-dgx-devops-serverless128927576
    4.2M	./git-xargs-dgx-common-services491456596
    4.2M	./git-xargs-dgx-common-services3582270430
    4.2M	./git-xargs-dgx-common-services2000672389
    4.2M	./git-xargs-dgx-common-services1293356187
    4.1M	./git-xargs-dgx-claims-service51095670
    4.1M	./git-xargs-dgx-claims-service1317238455
    4.0M	./git-xargs-dgx-claims-service598378118
    4.0M	./git-xargs-dgx-claims-service3887577741
    3.6M	./git-xargs-dgx-common-basket-service2783467346
    3.4M	./git-xargs-dgx-common-basket-service2102640962
    3.2M	./git-xargs-dgx-randc-calendar-service608672353
    3.2M	./git-xargs-dgx-common-person-service1016254311
    2.8M	./git-xargs-dgx-common-basket-service649762349
    2.6M	./git-xargs-dgx-randc-calendar-service1262282764
    2.6M	./git-xargs-dgx-common-basket-service497612144
    2.6M	./git-xargs-dgx-common-basket-service3018723509
    2.5M	./git-xargs-dgx-randc-repair-record-service722209285
    2.5M	./git-xargs-dgx-randc-repair-record-service52961552
    2.5M	./git-xargs-dgx-randc-repair-record-service2450792822
    2.5M	./git-xargs-dgx-randc-repair-record-service2170856959
    2.5M	./git-xargs-dgx-randc-repair-record-service1677535228
    2.5M	./git-xargs-dgx-randc-calendar-service4082317522
    2.5M	./git-xargs-dgx-randc-calendar-service3869472038
    2.5M	./git-xargs-dgx-randc-calendar-service2469708160
    2.4M	./git-xargs-dgx-common-person-service585502068
    2.4M	./git-xargs-dgx-common-person-service1949464635
    2.3M	./git-xargs-dgx-common-person-service4179273804
    2.3M	./git-xargs-dgx-common-person-service1961217495
    2.2M	./git-xargs-dgx-randc-fault-array-service764424756
    2.2M	./git-xargs-dgx-randc-fault-array-service3359491842
    2.2M	./git-xargs-dgx-randc-fault-array-service335896226
    2.2M	./git-xargs-dgx-randc-fault-array-service3317283419
    2.2M	./git-xargs-dgx-randc-fault-array-service1527921735
    2.0M	./git-xargs-dgx-claims-auth-service883203696
    2.0M	./git-xargs-dgx-claims-auth-service4200032768
    2.0M	./git-xargs-dgx-claims-auth-service4125151531
    2.0M	./git-xargs-dgx-claims-auth-service270423822
    2.0M	./git-xargs-dgx-claims-auth-service1939072047
    1.9M	./git-xargs-dgx-template-serverless1388691735
    1.9M	./git-xargs-dgx-template-serverless1340661728
    1.8M	./git-xargs-dgx-template-serverless4110527560
    1.8M	./git-xargs-dgx-template-serverless3071265855
    1.8M	./git-xargs-dgx-template-serverless1845506612
    1.8M	./git-xargs-dgx-skyprotect-plan-service4007101597
    1.8M	./git-xargs-dgx-skyprotect-plan-service3697141120
    1.8M	./git-xargs-dgx-skyprotect-plan-service3591216090
    1.8M	./git-xargs-dgx-skyprotect-plan-service3342834588
    1.8M	./git-xargs-dgx-skyprotect-plan-service1474255810
    1.8M	./git-xargs-dgx-register-service1516419224
    1.7M	./git-xargs-dgx-register-service913907664
    1.7M	./git-xargs-dgx-register-service479951696
    1.7M	./git-xargs-dgx-register-service2708612804
    1.7M	./git-xargs-dgx-register-service2130368497
    1.7M	./git-xargs-dgx-randc-model-search-service3287565133
    1.7M	./git-xargs-dgx-randc-model-search-service3234429959
    1.7M	./git-xargs-dgx-randc-model-search-service2381107305
    1.7M	./git-xargs-dgx-randc-model-search-service1821807766
    1.7M	./git-xargs-dgx-randc-model-search-service1383130522
    1.7M	./git-xargs-dgx-common-test-event-service892877202
    1.7M	./git-xargs-dgx-common-test-event-service674811894
    1.7M	./git-xargs-dgx-common-test-event-service3637319092
    1.7M	./git-xargs-dgx-common-test-event-service3577161244
    1.7M	./git-xargs-dgx-common-test-event-service1721180667
    1.7M	./git-xargs-dgx-common-catalogue-service983939112
    1.7M	./git-xargs-dgx-common-catalogue-service2772470287
    1.7M	./git-xargs-dgx-common-catalogue-service2509154114
    1.7M	./git-xargs-dgx-common-catalogue-service2099321381
    1.7M	./git-xargs-dgx-common-catalogue-service1891326121
    1.7M	./git-xargs-dgx-common-auth-service844095786
    1.7M	./git-xargs-dgx-common-auth-service834682523
    1.7M	./git-xargs-dgx-common-auth-service4055385734
    1.7M	./git-xargs-dgx-common-auth-service1811526230
    1.7M	./git-xargs-dgx-common-auth-service1161090524
    1.6M	./git-xargs-dgx-myaccount-auto-account-etl898797957
    1.6M	./git-xargs-dgx-myaccount-auto-account-etl415195308
    1.6M	./git-xargs-dgx-myaccount-auto-account-etl3964327510
    1.6M	./git-xargs-dgx-myaccount-auto-account-etl2747648088
    1.6M	./git-xargs-dgx-myaccount-auto-account-etl1831452060
    1.5M	./git-xargs-dgx-model-search-service662120063
    1.5M	./git-xargs-dgx-model-search-service3681460599
    1.5M	./git-xargs-dgx-model-search-service3580138691
    1.5M	./git-xargs-dgx-model-search-service2402385925
    1.5M	./git-xargs-dgx-model-search-service1796394386
    1.3M	./git-xargs-dgx-common-payment-service4043116693
    1.3M	./git-xargs-dgx-common-payment-service3805125252
    1.3M	./git-xargs-dgx-common-payment-service315251800
    1.3M	./git-xargs-dgx-common-payment-service3049033308
    1.3M	./git-xargs-dgx-common-payment-service2832457602
    1.2M	./git-xargs-dgx-common-log-alert-service961588218
    1.2M	./git-xargs-dgx-common-log-alert-service490772998
    1.2M	./git-xargs-dgx-common-log-alert-service339914197
    1.2M	./git-xargs-dgx-common-log-alert-service238092585
    1.2M	./git-xargs-dgx-common-log-alert-service2337964869
    1.2M	./git-xargs-dgx-common-imei-service953757373
    1.2M	./git-xargs-dgx-common-imei-service537027263
    1.2M	./git-xargs-dgx-common-imei-service2268986149
    1.2M	./git-xargs-dgx-common-imei-service1339475111
    1.2M	./git-xargs-dgx-common-imei-service1279518698
    1.2M	./git-xargs-dgx-common-esb-mock-service3924556738
    1.2M	./git-xargs-dgx-common-esb-mock-service367906134
    1.2M	./git-xargs-dgx-common-esb-mock-service297756220
    1.2M	./git-xargs-dgx-common-esb-mock-service259114694
    1.2M	./git-xargs-dgx-common-esb-mock-service175502976
    1.1M	./git-xargs-dgx-monthlycare-mocks3789520140
    1.1M	./git-xargs-dgx-monthlycare-mocks3313344980
    1.1M	./git-xargs-dgx-monthlycare-mocks2236466073
    1.1M	./git-xargs-dgx-monthlycare-mocks1441079628
    1.1M	./git-xargs-dgx-monthlycare-mocks1243466874
    1.0M	./git-xargs-dgx-template-nx-serverless740514672
    1.0M	./git-xargs-dgx-template-nx-serverless3962533842
    1.0M	./git-xargs-dgx-template-nx-serverless308818190
    1.0M	./git-xargs-dgx-template-nx-serverless2986665723
    1.0M	./git-xargs-dgx-template-nx-serverless122325124
    980K	./git-xargs-dgx-devops-pipeline-slack2687683694
    980K	./git-xargs-dgx-devops-pipeline-slack2570664404
    968K	./git-xargs-dgx-devops-pipeline-slack2529337648
    968K	./git-xargs-dgx-devops-pipeline-slack1113530402
    968K	./git-xargs-dgx-devops-pipeline-slack1065848740
    964K	./git-xargs-dgx-common-log-queries3822392521
    964K	./git-xargs-dgx-common-log-queries3755063549
    964K	./git-xargs-dgx-common-log-queries3119748841
    964K	./git-xargs-dgx-common-log-queries2477311213
    964K	./git-xargs-dgx-common-log-queries2448373359
    856K	./git-xargs-dgx-template-glue833851757
    856K	./git-xargs-dgx-template-glue4091880147
    856K	./git-xargs-dgx-template-glue3470239330
    856K	./git-xargs-dgx-template-glue3382504572
    856K	./git-xargs-dgx-template-glue2509518460
    800K	./git-xargs-dgx-devops-deploy-workflow929715025
    800K	./git-xargs-dgx-devops-deploy-workflow3833753504
    800K	./git-xargs-dgx-devops-deploy-workflow2820543249
    800K	./git-xargs-dgx-devops-deploy-workflow2394489380
    800K	./git-xargs-dgx-devops-deploy-workflow1810561314
    440K	./git-xargs-dgx-devops-cfn-certificate-provider753957369
    440K	./git-xargs-dgx-devops-cfn-certificate-provider3410003968
    440K	./git-xargs-dgx-devops-cfn-certificate-provider3186139486
    440K	./git-xargs-dgx-devops-cfn-certificate-provider171854214
    440K	./git-xargs-dgx-devops-cfn-certificate-provider1533139722
    

    As one can check, there are multiple instances of the same repository, which can lead to extreme sizes after using git-xargs for a long time.

    Describe alternatives you've considered

    I see a couple of alternatives to resolve this issue:

    1. Clean up the repos after each execution from git-xargs. Add a optional flag --keep-cloned-repositories to keep the repo for debugging purposes.

    2. Make the CLI check if the repositories that need cloning are not already present in the filesystem. If they are, perform a git pull instead of cloning the repository again. This one will probably need changing quite a lot in the code, but can lead to improvements on performance, specially when dealing with large repositories.

    Additional context

    N/A

    enhancement 
    opened by plinioh 1
  • Git-xargs execution hangs with no error message

    Git-xargs execution hangs with no error message

    Upon execution, git-xargs hangs with no error message: image

    This is the command I'm trying to execute in the shell script (Token, org name and repo name have been removed while reporting this issue):

    export GITHUB_TOKEN=XXX

    git-xargs
    --loglevel DEBUG
    --dry-run
    --branch-name testing
    --commit-message "Creation File Test"
    --repo <org-name>/<repo-name>
    touch hello-world.txt

    Please advise what the issue might be, thank you.

    opened by akohjialing 1
  • Feature request: Push to default branch  if no --branch-name flag is supplied

    Feature request: Push to default branch if no --branch-name flag is supplied

    Describe the solution you'd like Currently we have to specify branch in which changes needs to be pushed . But in our case we have around 100s of repo and we want to push same content on. different branches of repo (As a standard we have made those branches as default )

    Describe alternatives you've considered We can do it via creating PR , but in our case we want to force these changes donot want PR's

    Additional context Add any other context or screenshots about the feature request here.

    enhancement 
    opened by anurag4517 0
Releases(v0.1.3)
CLI tool for manipulating GitHub Labels across multiple repositories

takolabel Installation Mac $ brew install tommy6073/tap/takolabel Other platforms Download from Releases page in this repository. Usage Set variables

Takayuki NAGATOMI 10 Nov 3, 2022
Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs heavy machines is the same on most cloud providers.

gomap Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs he

null 21 Sep 16, 2022
A better way to clone, organize and manage multiple git repositories

git-get git-get is a better way to clone, organize and manage multiple git repositories. git-get Description Installation macOS Linux Windows Usage gi

Greg Dlugoszewski 64 Nov 16, 2022
git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt.

Git GoGlimpse git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt. The particularity of this

Corentin de Boisset 0 Jan 27, 2022
A CLI to replace your git commit command, so your git message can partially follow the Conventional Changelog ecosystem

COMMIT CLI A CLI to replace your git commit command, so your git message can partially follow the Conventional Changelog ecosystem. And yes, it is bui

Hisam Fahri 1 Feb 9, 2022
GitHub CLI extension to clone (or update) all repositories in an Organization, with the ability to filter via search queries.

gh-org-repo-sync GitHub CLI extension to clone all repositories in an Organization, with the ability to filter via search queries. If a local clone al

Armel Soro 12 Nov 2, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

null 0 Nov 22, 2021
Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊

askgit is a command-line tool for running SQL queries on git repositories. It's meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands.

AskGit 3.2k Jan 3, 2023
A command line http test tool. Maintain the case via git and pure text

httptest A command line http test tool Maintain the api test cases via git and pure text We want to test the APIs via http requests and assert the res

wklken 13 Dec 16, 2022
A simple single-file executable to pull a git-ssh repository and serve the web app found to a self-contained browser window

go-git-serve A simple single-file executable to pull a git-ssh repository (using go-git library) and serve the web app found to a self-contained brows

Justin Searle 0 Jan 19, 2022
A minimal CLI tool to enable (or disable) dependabot for all your repositories

Enable Dependabot A minimal CLI tool to enable (or disable) dependabot for all your repositories. Installation Install via Go go get -v github.com/RiR

Rick Rackow 1 Feb 10, 2022
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Clement Sam 2.1k Dec 30, 2022
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Venky 0 Dec 22, 2021
Go terminal app listing open pull requests in chosen GitHub repositories

go-pr-watcher About Shows open pull requests on configured GitHub repositories. Getting started Create GitHub personal token with read permissions Cre

Oleg 1 Aug 23, 2022
Mass download all github repositories(public & private) of an organization, ideally in a few seconds.

Git Mass Mass download all github repositories(public & private) of an organization, ideally in a few seconds. Writing this as a simple bash script wo

Nithin Jois 0 Dec 27, 2021
Self-host your GitHub repositories.

self-forge One day, I'd like to write a lightweight clone of GitHub. For now, here's ~100 lines of Go that host your source files. Clones all of a Git

Andrew Healey 12 Jan 6, 2022
Contextual information about your git projects, right on the command-line

gitty gitty is a smart little CLI helper for git projects, that shows you all the relevant issues, pull requests and changes at a quick glance. It cur

Christian Muehlhaeuser 406 Jan 8, 2023
A command-line driven git server

GitGo GitGo is split into three parts: The API server The GIT server The CLI client We need a couple of certificates before setting up the application

null 0 Dec 14, 2021
GitHub’s official command line tool

GitHub CLI gh is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already

GitHub CLI 30.9k Jan 7, 2023