Before the bot reacted to the /backport command anywhere in the comment, now it needs to be at the start of the line.
Additionally, if the check for repo collaborator fails print a link to the Microsoft team on GitHub to change visibility (most common failure case).
The codespaces prebuild action can only run in the dotnet/runtime repo and not forks. The feature needs to be enabled for each repo and will fail if it isn't enabled. In order to minimize failure notifications, add a check to the action so it only runs against dotnet/runtime.
Currently, Actions in the dotnet/runtime repository have read/write
access by default, unless their permissions have been explicitly declared.
The markdownlint workflow can be restricted from all access except the
repository contents. This limits what the 3rd party `markdownlint-cli`
npm package can do which is installed as part of the workflow.
- mark onCreateCommand.sh as executable
- add more regions so users outside of West US can take advantage of prebuilt codespaces
- use v1-stable version, as recommended by docs
- use faster machines for dev productivity
GitHub Actions started doing shallow checkouts so we often ran into the case where applying the patch would fail with an error due to the commit blobs not being available:
```
error: sha1 information is lacking or useless (eng/pipelines/common/xplat-setup.yml).
error: could not build fake ancestor
```
Fix this by always checking out the whole history. Since this makes checkout quite slow (~2mins), refactor the action so we post the "Started backporting" comment before doing the checkout so the user isn't confused why nothing happens.
This adds an action that can be triggered with a special comment on a PR: `/backport to <some branch>`.
The action then creates a new PR to the target branch with the commits from the source PR applied.