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

Lists handler #4755

Closed
wants to merge 12 commits into from
Closed

Lists handler #4755

wants to merge 12 commits into from

Conversation

HiteshRepo
Copy link
Contributor

Introduces lists backup handler, then uses it to fetch lists and its associated relationships from Lists client wrapper.
Moves code to fetch lists to Lists client wrapper.

Does this PR need a docs update or release note?

  • ✅ Yes, it's included
  • 🕐 Yes, but in a later PR
  • ⛔ No

Type of change

  • 🌻 Feature
  • 🐛 Bugfix
  • 🗺️ Documentation
  • 🤖 Supportability/Tests
  • 💻 CI/Deployment
  • 🧹 Tech Debt/Cleanup

Issue(s)

#4754

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Copy link
Contributor

aviator-app bot commented Nov 30, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was closed without merging. If you still want to merge this PR, re-open it.


See the real-time status of this PR on the Aviator webapp.

Use the Aviator Chrome Extension to see the status of your PR within GitHub.

Copy link

sonarcloud bot commented Nov 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@ryanfkeepers ryanfkeepers left a comment

Choose a reason for hiding this comment

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

I've only glanced over the changes. Before digging into it, I'd like to request that the PR get broken into separate parts for ease of review.

  1. code movement from /site/lists to /api/lists
  2. /api/lists.go and /api/lists_test.go additions
  3. /collection/site/handlers.go and /collection/site/lists_handler.go implementations
    4 the rest

This will divide the PR into smaller, logical sets of changes, which will be both easier to read and easier to evaluate compared to this PR, which is acting on multiple layers at once.

@@ -62,3 +63,228 @@ func (c Lists) PostDrive(

return drive, graph.Wrap(ctx, err, "fetching created documentLibrary").OrNil()
}

// SharePoint lists represent lists on a site. Inherits additional properties from
Copy link
Contributor

Choose a reason for hiding this comment

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

It's difficult to identify changes when code blocks get moved. Preference is to have those movements occur in a separate PR so that changes are highlighted. Could you please make a PR that separates out this movement from the rest of the changes?

list := models.NewList()
list.SetDisplayName(&listID)

_, err := acl.Stable.Client().Sites().BySiteId(siteID).Lists().Post(ctx, list, nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep with code standards, please multi-line long func chains like this.

Suggested change
_, err := acl.Stable.Client().Sites().BySiteId(siteID).Lists().Post(ctx, list, nil)
_, err := acl.Stable.
Client().
Sites().
BySiteId(siteID).
Lists().
Post(ctx, list, nil)

Copy link
Contributor

Choose a reason for hiding this comment

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

filename suggestion: list.go. Then we can put all of the list mocks into it.

@HiteshRepo
Copy link
Contributor Author

closing this as this PR has been bifurcated into smaller PRs

@HiteshRepo HiteshRepo closed this Dec 2, 2023
@HiteshRepo HiteshRepo deleted the lists-handler branch December 28, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance tech-debt Non-feature, non-bug improvements to the codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants