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

Editorial workflow screen shows current user as author for all entries, not PR author #7232

Closed
robbymilo opened this issue Jun 13, 2024 · 3 comments
Labels
area: ui/editorial-workflow type: bug code to address defects in shipped code

Comments

@robbymilo
Copy link

robbymilo commented Jun 13, 2024

Screenshot from 2024-06-13 10-03-41

Describe the bug

The editorial workflow screen does not show the correct author of an entry.

To Reproduce

  1. Save an edit in editorial mode - do not publish it.
  2. Log in as another GitHub user.
  3. View the editorial workflow screen - the entry will show as if it were created by the current logged in user.

Expected behavior

The workflow screen should show the author of the PR.

Screenshots

Applicable Versions:

  • Decap CMS version:
    • decap-cms-app 3.1.10
    • decap-cms-core 3.3.6
  • Git provider: GitHub
  • OS: Linux
  • Browser version Firefox 125.0b6
  • Node.JS version: n/a

CMS configuration

n/a

Additional context

Happy to make an attempt with a PR to fix this if you can point me to the code :)

@robbymilo robbymilo added the type: bug code to address defects in shipped code label Jun 13, 2024
@robbymilo
Copy link
Author

Looks like this was introduced by https://github.com/decaporg/decap-cms/releases/tag/decap-cms%403.1.1. 3.0.12 is working properly.

@domcleal
Copy link
Contributor

I'm seeing this too on decap-cms-app@3.1.11 with decap-cms-backend-github@3.1.2. It's OK on decap-cms-app@3.0.12 and decap-cms-backend-github@3.0.3. All of the cards on the Workflow tab now show my name as the author, however the PRs and commits are from other authors.

Perhaps related to this commit, which seems to change the implementation of getPullRequestAuthor to just return the current user?

4f419dd#diff-dc40d227a33ffa35586e44b74c02b33b179e84e0c02004d5e993b821c8716650L578-L582

domcleal added a commit to domcleal/decap-cms that referenced this issue Jul 12, 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.
domcleal added a commit to domcleal/decap-cms that referenced this issue Jul 12, 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.
@domcleal
Copy link
Contributor

Enabling the GraphQL API client seems to be a decent workaround, as it has a different getPullRequestAuthor implementation - add use_graphql: true to the backend configuration.

I've opened PR #7253 too.

martinjagodic added a commit that referenced this issue 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
area: ui/editorial-workflow type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

3 participants