dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.91k stars 4.01k forks source link

[Infra] Trigger insertion validation more easily directly from github PR #60660

Open dibarbet opened 2 years ago

dibarbet commented 2 years ago

A request from Cyrus today was having the ability to more easily trigger an insertion + RPS + speedometer from a commit in a PR. For example via /azp run pr-validation

Some things to work out before we can do this

  1. should only be triggerable by those with access to the internal vs repo.
  2. should be required to specify a commit so it doesn't run on an arbitrary commit

cc @vatsalyaagrawal @JoeRobich

JoeRobich commented 2 years ago

Looks like the Runtime repo uses GitHub Actions for implementing a /backport comment command (https://github.com/dotnet/runtime/blob/main/.github/workflows/backport.yml). Perhaps we could implement this in a similar fashion.

davidwengier commented 2 years ago

VSMac also has various /backport style commands they can issue, though probably benefit from being a private repo. It doesn't look like the runtime backport has any auth considerations, which makes sense if it's just opening a PR on GitHub.

The GitHub agents all have .net installed though so in theory an action would just need to install the roslyn-tools global tool, and run a command. Could probably use Octokit API to check team membership.

Youssef1313 commented 2 years ago

It doesn't look like the runtime backport has any auth considerations

It does, but not in the referenced yml directly:

https://github.com/dotnet/runtime/blob/71294e8176f48c7aecd40c849a40c2dec1d01bfd/.github/workflows/backport.yml#L45-L49

https://github.com/dotnet/runtime/blob/71294e8176f48c7aecd40c849a40c2dec1d01bfd/eng/actions/backport/index.js#L31-L43