angular-cn/dev-infra/pr/merge
Paul Gschwendtner 2843f15e8c fix(dev-infra): merge tool should ensure that token has `workflow` oauth scope (#41989)
Currently if a PR modifies any file that configures a Github action
(e.g. a workflow file), the caretaker might face an error when merging
such PR:

```
! [remote rejected]       merge_pr_target_11.2.x -> 11.2.x (refusing to allow a Personal Access Token to create or update workflow
```

This happens because Github requires the token being used for the
push operation to have the `workflow` scope set. This is a special
scope added by Github to ensure that no changes can be made on
upstream branches that might expose the `GITHUB_TOKEN` environment
variable, which is available for push builds and could cause the
token being leaked.

With this commit we enforce that the caretaker adds the workflow
scope to their github token. Since PRs can only be merged if reviewed
thoroughly, it's acceptable to allow workflow file changes being
merged through the merge tool by the caretaker (especially since we
also allow CircleCI config files being merged with the default
`repo`/`public_repo` scope).

PR Close #41989
2021-05-07 14:10:39 -04:00
..
defaults feat(dev-infra): Set up new common release notes generation tooling (#41905) 2021-05-06 09:40:29 -04:00
strategies refactor(dev-infra): use a singleton for GitClient (#41515) 2021-04-12 16:43:54 -07:00
BUILD.bazel refactor(dev-infra): use graphql to query PRs in merge tooling (#41459) 2021-04-07 11:52:35 -07:00
cli.ts refactor(dev-infra): use a singleton for GitClient (#41515) 2021-04-12 16:43:54 -07:00
config.ts feat(dev-infra): verify breaking changes are properly labeled before merging (#41546) 2021-04-12 10:11:17 -07:00
failures.ts feat(dev-infra): prevent attempting to merge draft, closed or merged pull requests (#41604) 2021-04-14 15:44:55 -07:00
index.ts docs(dev-infra): update jsdoc comments to reflect recent code changes (#41688) 2021-04-19 08:28:34 -07:00
messages.ts
pull-request.ts feat(dev-infra): prevent pr merges of features or breaking changes on rc (#41660) 2021-04-16 13:09:47 -07:00
string-pattern.ts
target-label.ts fix(dev-infra): detect multiple target labels as invalid (#40156) 2021-01-11 09:56:22 -08:00
task.ts fix(dev-infra): merge tool should ensure that token has `workflow` oauth scope (#41989) 2021-05-07 14:10:39 -04:00