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

Feature Request:Mark file as reviewed #7

Closed
abdulkareemnalband opened this issue Jan 20, 2021 · 7 comments · Fixed by #44
Closed

Feature Request:Mark file as reviewed #7

abdulkareemnalband opened this issue Jan 20, 2021 · 7 comments · Fixed by #44
Labels
enhancement New feature or request

Comments

@abdulkareemnalband
Copy link

Issue Type: Feature Request

I'm using this extension for past couple of days,
I missing mark file as reviewed from web UI a lot
image

Extension version: 0.0.7
VS Code version: Code - Insiders 1.53.0-insider (32b28f6f8f9dfe36efad102cc460e14a84ba756a, 2021-01-19T06:09:44.762Z)
OS version: Windows_NT x64 10.0.19042

@ankitbko ankitbko added the enhancement New feature or request label Jan 20, 2021
@ankitbko
Copy link
Owner

Related to microsoft#520. However I do not see any AzDO API to set a file reviewed. I will need to dig into it a little more.

@ImanMahmoudinasab
Copy link

@ankitbko now microsoft#520 is implemented. Also a local storage can be used to keep the state.

@ankitbko
Copy link
Owner

ankitbko commented Apr 20, 2021

Great. I am thinking of keeping the state in memory. So the reviewed symbol will show on file till vscode is restarted or the PR is refreshed.

Will this work or are you looking at more persisted review feature?

@ImanMahmoudinasab
Copy link

ImanMahmoudinasab commented Apr 21, 2021

.... However I do not see any AzDO API to set a file reviewed. ...

Actually, there is an API that Microsoft azure uses to store review state:
https://dev.azure.com/{projectName}/_apis/Contribution/HierarchyQuery/project/{projectId}
I could not find the documents for the API.

image
modifyHashes: file names

@ankitbko
Copy link
Owner

Yes I have seen that. Its not a supported API to be consumed from client. The AzDO client I am using does not have this API exposed as well. I don't want to add dependency to unsupported API and bypassing the AzDO Node client as well. Its too much of effort and moreover I can never be sure if the API will work in expected way for all organizations deployments.

So here is my question - what features are you looking for? Specifically in terms of persistence, below are 2 options I can think of -

  1. The metadata about reviewed file is maintained in memory as part of the PR itself, so any action that refreshed PR (manually refreshing, restarting VS Code, etc) will loose the review status.
  2. I can try storing the metadata using Memento in workspace scoped storage so the reviewed file status persists across vscode restarts and PR refreshes.

The other thing I will need to take care of is to automatically remove the review flag from a file if the file gets updated. So I am thinking to key the review flag using file SHA. Will need to investigate this further.

@ImanMahmoudinasab
Copy link

Yeah, you are right about the API, I mention it here because I thought it might be standard API, but I couldn't find the API.

I think option 2 is a better choice as the review process may take more time, and in the meanwhile, the reviewer, for any reason(updating VScode to a newer version, for example), may want to close/restart the VScode.
When review result in code change, ideally reviewer would like to see which files should be reviewed (including newly changed, added, and removed files)

@ankitbko
Copy link
Owner

This feature is released as part of v0.0.22. Read more on wiki. https://github.com/ankitbko/vscode-pull-request-azdo/wiki/Mark-file-as-Viewed
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants