angular-cn/dev-infra/pr
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
..
check-target-branches refactor(dev-infra): use a singleton for GitClient (#41515) 2021-04-12 16:43:54 -07:00
checkout build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182) 2020-10-08 11:54:59 -07:00
common refactor(dev-infra): use a singleton for GitClient (#41515) 2021-04-12 16:43:54 -07:00
discover-new-conflicts fix(dev-infra): add github token requirement for discover-new-conflicts (#41825) 2021-04-27 10:23:16 -07:00
merge fix(dev-infra): merge tool should ensure that token has `workflow` oauth scope (#41989) 2021-05-07 14:10:39 -04:00
rebase refactor(dev-infra): use a singleton for GitClient (#41515) 2021-04-12 16:43:54 -07:00
BUILD.bazel feat(dev-infra): provide tooling to check what branches a pr targets (#39504) 2020-11-03 14:55:24 -08:00
cli.ts feat(dev-infra): support --no-branch-prompt to suppress the merge tool branch target confirmation (#40528) 2021-01-25 10:45:57 -08:00