dotnet / format

Home for the dotnet-format command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace Fabric Bot automation for requiring reviews of PRs that cange the .NET SDK version

jeffhandley opened this issue · comments

This repository has had automation in place that prevents auto-merge of PRs that change the .NET SDK version. That automation was implemented through the Fabric Bot tooling with the following logic:

  1. When a pull request is opened
  2. If the body of the pull requst contains the string, "Updates sdk.version"
  3. And the author of the PR is "dotnet-maestro[bot]"
  4. Then issue the action of requiring changes to the pull request, leaving a comment of, "This PR changes the .NET SDK version. Review required before merging."

We need to remove this automation as our migration from Fabric Bot to the Policy Service Resource Management tooling will not support the automated action of requesting changes to a pull request.

After the migration to the new service is completed, we can reintroduce this automation, perhaps with the approach of using the same logic as above, but issuing the action of disabling auto-merge, either through removing the label or using GitHub's built-in auto-merge and disabling that.

/cc @arkalyanms @wtgodbe @mkArtakMSFT @jaredpar

Once dotnet-format moves to a version of Roslyn which includes the OOP build host (see #2005), it will no longer be necessary to gate updates to the SDK version. The gate was added to ensure that NuGet package version was updated to a version corresponding with the new SDK version.

The first-party approach here would be to create a Github Actions workflow that fails when the conditions for an extra review are not met, but an extra review has not been provided. Neither Fabric Bot nor Policy Service Resource Management are appropriate tools here, since this is an open-source example repository and neither of these tools are available to the general public.

Note that the action should not post a comment to the pull request, and should also not request changes. Github Checks are the tool for gating merges to the repository.

I was just about to comment here too, @sharwell, that there isn't a clear path toward achieving this behavior with FabricBot / Policy Service, and we need to proceed with the migration to Policy Service. I'm going to send a PR that turns deletes the configuration of managing auto-merge through those services, as that unblocks the port to Policy Service. That does mean maintainers of this repo will need to pursue a different approach (GitHub Actions being the recommendation) to manage auto-merge as appropriate for this repository.

Please see #2111. That PR prepares this repository for the Policy Service migration, and that includes removing the auto-merge automation that cannot be ported over.