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

feat: display author of changes in workflow tab #5780

Merged

Conversation

pr0grammm
Copy link
Contributor

@pr0grammm pr0grammm commented Sep 4, 2021

feat: display author of changes in workflow tab

Summary
Addresses #5466 : Display author of changes in workflow tab.
Have made code changes to display the post author name below the collection name inside the change card.

Test plan
This PR changes the UI by adding the author name as seen in the below screenshot:
image

At this time, changes have been made for GitHub backend. Need to propagate the changes for other backends and test for those as well.

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • Code is formatted via running yarn format.
  • Tests are passing via running yarn test.
  • The status checks are successful (continuous integration). Those can be seen below.

Cute baby elephant
image

@pr0grammm pr0grammm requested a review from a team September 4, 2021 21:55
@pr0grammm pr0grammm marked this pull request as draft September 5, 2021 08:05
@pr0grammm pr0grammm marked this pull request as ready for review September 6, 2021 09:01
@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Sep 9, 2021
@erezrokah erezrokah force-pushed the 5466-display-author-in-workflow-tab branch from fafe278 to fed1aa7 Compare September 10, 2021 15:00
Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow up @pr0grammm!

This seems to break GitHub when using GraphQL. You can add use the following configuration to reproduce:

backend:
  name: github
  branch: <branch>
  repo: <repo>
  use_graphql: true

Also it's missing the Azure DevOps backend.

Finally, should we show the user full name instead of the login handle?

@pr0grammm
Copy link
Contributor Author

pr0grammm commented Sep 11, 2021

Thanks for the follow up @pr0grammm!

👍

This seems to break GitHub when using GraphQL. You can add use the following configuration to reproduce:

backend:
  name: github
  branch: <branch>
  repo: <repo>
  use_graphql: true

Thanks, I have addressed this, please have a check. GraphQL is supported currently only for GitHub right?

Also it's missing the Azure DevOps backend

I am quite unfamiliar with this backend. I may be slow to address this.

Finally, should we show the user full name instead of the login handle?

👍. Since configuring the full name is optional there are chances for it to be empty. We can try to display the full name and if it is empty then we can fallback to the login handle maybe? Also for GitHub I am unable to find the full name returned in the API response. It seems to me only the login is present?

@erezrokah
Copy link
Contributor

GraphQL is supported currently only for GitHub right?

Yes, it is

I am quite unfamiliar with this backend. I may be slow to address this.

Let me see if I can recreate my setup for Azure.

Since configuring the full name is optional there are chances for it to be empty. We can try to display the full name and if it is empty then we can fallback to the login handle maybe?

That makes sense

Also for GitHub I am unable to find the full name returned in the API response. It seems to me only the login is present?

I think so, we might be able to update the GraphQL query to get it, but for the REST API we may need to send an additional request (which is unfortunate)

@pr0grammm
Copy link
Contributor Author

@erezrokah wonder why the CI fails?

@erezrokah
Copy link
Contributor

@erezrokah wonder why the CI fails?

We use pre-recorded data to test the different backends. The GraphQL query changes means that we'll need to update the data similar to fb51377.

Let me try a find/replace to fix this

@pr0grammm
Copy link
Contributor Author

Sure thanks a lot

@erezrokah erezrokah force-pushed the 5466-display-author-in-workflow-tab branch from 447562f to bb4bde5 Compare September 14, 2021 10:52
@pr0grammm
Copy link
Contributor Author

pr0grammm commented Sep 15, 2021

Hi @erezrokah! For GitLab and BitBucket, it seems that the full name is mandatory after all. So I have skipped checking for the login handle altogether. Hope that's okay. So now only GitHub is left to be handled...

@erezrokah erezrokah force-pushed the 5466-display-author-in-workflow-tab branch from 61c38bb to 39118d2 Compare October 15, 2021 14:34
@erezrokah
Copy link
Contributor

So now only GitHub is left to be handled

Done in 39118d2.

I hope parallelizing the requests the requests will lower the performance impact of sending an additional one

Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@pr0grammm
Copy link
Contributor Author

pr0grammm commented Oct 15, 2021

Done in 39118d2.

I hope parallelizing the requests the requests will lower the performance impact of sending an additional one

Awesome! Sorry I was not able to get to this. I think there is also a change needed in the graphql query in GitHub to retrieve the name and not just the login? I'll try to look into that this week.

@erezrokah
Copy link
Contributor

I think there is also a change needed in the graphql query in GitHub to retrieve the name and not just the login?

Good point! Done in 275ee3b

@erezrokah erezrokah merged commit 3f607e4 into decaporg:master Oct 18, 2021
@pr0grammm pr0grammm deleted the 5466-display-author-in-workflow-tab branch October 18, 2021 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants