Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fetch GitHub PR author name, fixes #7232 #7253

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

domcleal
Copy link
Contributor

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 in dev-test/config.yml, with multiple PRs open on the test repo by different authors.

Before on main (at 6179568):

image

After on this branch:

image

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:

Reverts the change to `getPullRequestAuthor` in the GitHub backend from
4f419dd, so that it fetches the PR author's name as before. In the AWS
Cognito GitHub backend, return the GitHub login as the PR author.
@martinjagodic martinjagodic enabled auto-merge (squash) August 1, 2024 12:53
@martinjagodic martinjagodic merged commit 0e5335d into decaporg:main Aug 1, 2024
9 checks passed
martinjagodic added a commit that referenced this pull request Aug 5, 2024
Reverts the change to `getPullRequestAuthor` in the GitHub backend from
4f419dd, so that it fetches the PR author's name as before. In the AWS
Cognito GitHub backend, return the GitHub login as the PR author.

Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants