Skip to content

kolah/github-batch-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github batch updater

This application is a rough tool to help with mundane tasks like updating same GH workflow in multiple repos.

It is able to fetch files from multiple repositories, replace some strings and create a PR with the changes.

Installation

go install github.com/kolah/github-batch-updater/cmd/gbu@latest

Usage

In order to interact with the GitHub API, you need to set the GITHUB_PERSONAL_ACCESS_TOKEN with a personal access token. The token should have the repo scope. If you want to interact with github workflows, you need to add the workflow scope.

gbu run script.yml

Example script

batch:
  create_pr: true
  target_branch_name: batch-test
  repositories:
    - name: github-batch-updater
      owner: kolah
  replaces:
    .github/workflows/build_image.yaml:
      - match: "uses: examplecom/pipelines/.github/workflows/someworkflow.yaml@v1.3"
        replace: "uses: examplecom/pipelines/.github/workflows/someworkflow.yaml@v1.6.7"
      - match: "name: 'Weebhook for error'"
        replace: "name: 'Webhook for error'"
  pull_request:
    title: "Automatic PR batch update"
    body: "This PR updates the build image to the latest version."
    reviewers:
      - "kolah"
    team_reviewers:
      - "my-team"

About

A small tool to perform batch updates inside of multiple GH repos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages