Giter Club home page Giter Club logo

create-actionsprs's Introduction

Create-ActionsPRs

The script in this repository creates pull requests to push a GitHub Actions workflow to multiple repositories.

Prerequisites

Instructions

Option 1: Use GitHub API to automatically target everything

  1. Clone this repository to your local machine
  2. Open powershell and navigate to the directory you cloned this into
  3. Rename the file called .env-example to .env and add a GitHub token with the repo scope. If your organization requires SSO, authorize the token for SSO.
  4. Confirm that the workflows directory has all of the workflow files you want in it
  5. Run ./Create-ActionsPRs.ps1 to install the script.
  6. Run CreatePullRequestForRepositories -Repositories (GetReposFromOrganization -Organization orgname) -CommitMessage "message" -PRBody "prbody" -BranchName "branch_name"

This will create PRs in every repository that you have push permisisons in.

Option 2: Specify a list to target

  1. Clone this repository to your local machine
  2. Open powershell and navigate to the directory you cloned this into
  3. Confirm that you have all the workflow files you want in the workflows directory
  4. Run ./Create-ActionsPRs.ps1 to install the script.
  5. Create a file with a list of repository URLs, with one repository per line. Save it somewhere you can access.
  6. Confirm that the workflows directory has all of the workflow files you want in it
  7. Run CreatePullRequestsFromFile -FileName file.txt -CommitMessage "message" -PRBody "prbody" -BranchName "branch_name". Replace file.txt with the path to your file, and update the CommitMessage and PRBody as appropriate.

Option 3: Choose all CodeQL eligible repositories

  1. Clone this repository to your local machine
  2. Open powershell and navigate to the directory you cloned this into
  3. Rename the file called .env-example to .env and add a GitHub token with the repo scope. If your organization requires SSO, authorize the token for SSO.
  4. Confirm that the workflows directory has all of the workflow files you want in it; the CodeQL workflow file is already included in this repo
  5. Run CreatePullRequestsForCodeQLLanguages -Organization orgname with the organization you want to target instead of orgname. You may optionally override the commit message or PR body by adding -CommitMessage or -PRBody as appropriate.

create-actionsprs's People

Contributors

jhutchings1 avatar zkoppert avatar emtunc avatar hubwriter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.