This repository was archived by the owner on Sep 30, 2024. It is now read-only.
graphqlbackend: Add perforce changelist related properties#52937
Merged
Conversation
indradhanush
commented
Jun 5, 2023
indradhanush
commented
Jun 5, 2023
indradhanush
commented
Jun 6, 2023
Comment on lines
735
to
736
Contributor
Author
There was a problem hiding this comment.
Previous value was using the repo ID as 0 since the repos.GetByNameFunc was always returning nil. Updating this now returns repo ID as 2 which is the correct value.
Same for below.
83fc81d to
31268ab
Compare
4 tasks
e52a2aa to
897e915
Compare
Contributor
This was referenced Jun 9, 2023
pjlast
approved these changes
Jun 13, 2023
pjlast
left a comment
Contributor
There was a problem hiding this comment.
lgtm from a bit of an ignorant point of view when it comes to Perforce changelists
- Added tests - Added DB method to support this
74ccd94 to
232cf3f
Compare
Contributor
Author
|
Rebased off latest main because backcompat tests were failing. |
ErikaRS
pushed a commit
that referenced
this pull request
Jun 22, 2023
## What
In this PR we add two GraphQL API changes:
- The `Repository` node can now support querying `changelists` by
changelist ID similar to the `commits` API
- The `PerforceChangelist` node has two new properties:
1. `canonicalURL` - similar to the `GitCommit` node but uses
`/changelist/<cid>`
2. `commit` - the corresponding `GitCommit` from the repo
## Why
In the UI we want to be able to lookup a changelist by ID and display
all properties from the corresponding git commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Part of #40330.
What
In this PR we add two GraphQL API changes:
Repositorynode can now support queryingchangelistsby changelist ID similar to thecommitsAPIPerforceChangelistnode has two new properties:canonicalURL- similar to theGitCommitnode but uses/changelist/<cid>commit- the correspondingGitCommitfrom the repoWhy
In the UI we want to be able to lookup a changelist by ID and display all properties from the corresponding git commit
Test plan