multi-gitter

command module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 3 Imported by: 0

README

Go build status Go Report Card

Multi-gitter is a tool that allows you to run a script or program for every repository in a GitHub organisation that will then be committed and a PR will be created.

The script can be both a shell script or a binary. If the script returns with a 0 exit code and has made changes to the directory, a PR will be created.

Usage

  • run Clones multiple repostories, run a script in that directory, and creates a PR with those changes.
  • merge Merge pull requests.
  • status Get the status of pull requests.

run Usage of run

This command will clone down multiple repositories. For each of those repositories, the script will be run in the context of that repository. If the script finished with a zero exit code, and the script resulted in file changes, a pull request will be created with.

The environment variable REPOSITORY_NAME will be set to the name of the repository currently being executed by the script.

Usage:
  multi-gitter run [script path] [flags]

Flags:
  -B, --branch string           The name of the branch where changes are committed. (default "multi-gitter-branch")
  -m, --commit-message string   The commit message. Will default to title + body if none is set.
  -d, --dry-run                 Run without pushing changes or creating pull requests
  -R, --max-reviewers int       If this value is set, reviewers will be randomized
  -o, --org string              The name of the GitHub organization.
  -b, --pr-body string          The body of the commit message. Will default to everything but the first line of the commit message if none is set.
  -t, --pr-title string         The title of the PR. Will default to the first line of the commit message if none is set.
  -r, --reviewers strings       The username of the reviewers to be added on the pull request.

Global Flags:
  -g, --gh-base-url string   Base URL of the (v3) GitHub API, needs to be changed if GitHub enterprise is used.
  -L, --log-level string     The level of logging that should be made. Available values: trace, debug, info, error (default "info")
  -T, --token string         The GitHub personal access token. Can also be set using the GITHUB_TOKEN environment variable.

merge Usage of merge

Merge pull requests with a specified branch name in an organization and with specified conditions.

Usage:
  multi-gitter merge [flags]

Flags:
  -B, --branch string   The name of the branch where changes are committed. (default "multi-gitter-branch")
  -o, --org string      The name of the GitHub organization.

Global Flags:
  -g, --gh-base-url string   Base URL of the (v3) GitHub API, needs to be changed if GitHub enterprise is used.
  -L, --log-level string     The level of logging that should be made. Available values: trace, debug, info, error (default "info")
  -T, --token string         The GitHub personal access token. Can also be set using the GITHUB_TOKEN environment variable.

status Usage of status

Get the status of all pull requests with a specified branch name in an organization.

Usage:
  multi-gitter status [flags]

Flags:
  -B, --branch string   The name of the branch where changes are committed. (default "multi-gitter-branch")
  -o, --org string      The name of the GitHub organization.

Global Flags:
  -g, --gh-base-url string   Base URL of the (v3) GitHub API, needs to be changed if GitHub enterprise is used.
  -L, --log-level string     The level of logging that should be made. Available values: trace, debug, info, error (default "info")
  -T, --token string         The GitHub personal access token. Can also be set using the GITHUB_TOKEN environment variable.

Example script

#!/bin/bash

FILE="README.md"
if [ ! -f "$FILE" ]; then
    exit 1
fi

echo "Some extra text" >> README.md

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git
tools
docs command
readme-docs command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL