dotnet / fabricbot-config

Scripts for managing fabricbot configurations in the dotnet repos
MIT License
4 stars 7 forks source link

Automatically move assigned PRs into champion columns #3

Closed jeffhandley closed 2 years ago

jeffhandley commented 2 years ago

Several team members have requested that when a PR is assigned to them, that it should be automatically moved into their column on the PR project board. When we introduced the issue/PR project boards, we stated that there would be no automation to move issues/PRs into the "middle" columns, but this is a popular enough request that we should consider it.

We could do the same with issues as well--if an issue gets assigned to pod member, but the issue is still untriaged, it could be moved into their triage column.

If we do implement this, we'll need to have something that maps the github username to the pod member's columns on the boards.

jeffhandley commented 2 years ago

There are issues with how this was implemented. The pullRequestNeedsChampion and pullRequestChampionAssigned tasks are battling each other. pullRequestChampionAssigned only fires when the pull request is already on the project board in the Needs Champion column. But the pullRequestNeedsChampion task moving the pull request onto the board won't trigger the other task to fire.

We'll need to approach this differently, likely combining those two tasks together and using conditions on the author of the PR to go directly to their column, or perhaps to have the Needs Champion task first add it to the board and then move it to the column for the author (which should gracefully fail).