Skip to content

Commit

Permalink
Add details to README about PAT required permissions (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextu committed Oct 11, 2023
1 parent 7837405 commit 8e9e9ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ Running `./gradlew upgradeGradleWrapperXXX` will:
- If changes occurred
- create a specific branch
- commit and push the branch
- create a pull request on Github, it requires a Github access token, passed with `WRAPPER_UPGRADE_GIT_TOKEN` environment variable.
- create a pull request on GitHub, it requires a GitHub personal access token (PAT), passed with `WRAPPER_UPGRADE_GIT_TOKEN` environment variable.
This token is used to get the existing PRs on the repo and create one if needed, hence it requires:
- the `repo` scope for a classic PAT
- read-write permissions for "Pull requests" on the relevant repos for a fine-grained PAT

Note that a check is done first to make sure the branch does not exist yet. That way you can run `upgradeGradleWrapperAll` and `upgradeMavenWrapperAll` periodically with a cron, CI job... a bit like dependabot does for upgrading libs.

Expand Down Expand Up @@ -120,7 +123,7 @@ wrapperUpgrade {
| Field | description |
|:-----------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | A name identifying the upgrade, it can be different from the project name, for example when you need to upgrade multiple gradle projects in the same git project |
| `repo` | The Github repository to clone, format 'organization/project` |
| `repo` | The GitHub repository to clone, format 'organization/project` |
| `dir` | The directory inside the project base directory to run the gradle or maven upgrade in |
| `baseBranch` | The git branch to checkout and that the pull request will target |
| `options.gitCommitExtraArgs` | List of additional git commit arguments |
Expand Down

0 comments on commit 8e9e9ce

Please sign in to comment.