This is a pretty significant rewrite. Though the logic for selecting reviewers is much the same as in the original, the API interaction has changed significantly.
Thanks to the information available to us from the pull_request_target event this action runs on, I was able to pull down everything needed for this action in a single GraphQL call. This includes things like availability information and user IDs (necessary for the final GraphQL mutation). Some pre-processing indexes this info by username so it can be looked up when needed; all the selection logic uses login strings only, just like before.
All told, this should only make two calls to Github per invocation.
This is a pretty significant rewrite. Though the logic for selecting reviewers is much the same as in the original, the API interaction has changed significantly.
Thanks to the information available to us from the
pull_request_target
event this action runs on, I was able to pull down everything needed for this action in a single GraphQL call. This includes things like availability information and user IDs (necessary for the final GraphQL mutation). Some pre-processing indexes this info by username so it can be looked up when needed; all the selection logic uses login strings only, just like before.All told, this should only make two calls to Github per invocation.