fix: fetch GitHub PR author name, fixes #7232 #7253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This corrects the author names displayed beneath each in-flight pull request when using the editorial workflow with a GitHub backend. Since Decap 3.1, only the current user's name was being displayed beneath each workflow entry, as reported in #7232.
It reverts the change to
getPullRequestAuthor
in the GitHub backend from 4f419dd, so that it fetches the PR author's name as before.I've added a basic implementation for the AWS Cognito backend to simply return the GitHub login as the author name. I'm not sure what else we could display here if it's acting as a proxy to GitHub, and I don't think there's a mechanism to either identify the user who opened the PR or to look up their name, unless @soceanainn can advise.
Test plan
Configure a
github
backend indev-test/config.yml
, with multiple PRs open on the test repo by different authors.Before on
main
(at 6179568):After on this branch:
The second entry, which is a PR opened by a different GitHub user, shows the correct name from GitHub ("Test user real name") instead of my name on both PRs.
Checklist
Please add a
x
inside each checkbox: