multi-gitter

command module
v0.1.0 Latest Latest
Warning

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

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

README ΒΆ

πŸ›  multi-gitter

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.

πŸƒ Usage of run

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

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.
  -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.
  -T, --token string         The GitHub personal access token. Can also be set using the GITHUB_TOKEN environment variable.

πŸ”€ 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.
  -T, --token string         The GitHub personal access token. Can also be set using the GITHUB_TOKEN environment variable.

πŸ” 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.
  -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