Skip to content

octoherd/octoherd

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Octoherd

Octoherd Avatar

Octoherd allows you to run a script against multiple repositories in parallel.

A script is a JavaScript function that receives

  1. A pre-authenticated octokit instance
  2. A repository object
  3. An options object with script-specific options

Example

Source code for the hello world Octoherd script

/**
 * The "Hello, World!" of all Octoherd Scripts!
 *
 * @param {import('@octoherd/cli').Octokit} octokit
 * @param {import('@octoherd/cli').Repository} repository
 * @param {object} options
 * @param {string} [options.greetingName] name to be greeted
 */
export async function script(octokit, repository, { greetingName = "World" }) {
  octokit.log.info("Hello, %s! From %s", greetingName, repository.full_name);
}

Run the hello world script with

npx @octoherd/script-hello-world \
  --octoherd-token 0123456789012345678901234567890123456789 \
  "octoherd/*"

Find a script

For existing scripts, check out repositories with the octoherd-script label.

Create a script

To create your own script, run

npm init octoherd-script

and follow the instructions. See octoherd/create-octoherd-script for more information.

Get involved

It's a great time to get involved, look out for "pull request welcome" issues.

License

ISC

About

Manage multiple repository updates all at once.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published