The script in this repository creates pull requests to push a GitHub Actions workflow to multiple repositories.
- Install PowerShell
- Install and configure git, and configure your account for access to GitHub. Configuring SSH Keys
- Install GitHub CLI
- Clone this repository to your local machine
- Open powershell and navigate to the directory you cloned this into
- Rename the file called
.env-example
to.env
and add a GitHub token with therepo
scope. If your organization requires SSO, authorize the token for SSO. - Confirm that the
workflows
directory has all of the workflow files you want in it - Run
./Create-ActionsPRs.ps1
to install the script. - 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.
- Clone this repository to your local machine
- Open powershell and navigate to the directory you cloned this into
- Confirm that you have all the workflow files you want in the
workflows
directory - Run
./Create-ActionsPRs.ps1
to install the script. - Create a file with a list of repository URLs, with one repository per line. Save it somewhere you can access.
- Confirm that the
workflows
directory has all of the workflow files you want in it - 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.
- Clone this repository to your local machine
- Open powershell and navigate to the directory you cloned this into
- Rename the file called
.env-example
to.env
and add a GitHub token with therepo
scope. If your organization requires SSO, authorize the token for SSO. - 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 - 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.