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: Display changes since I last visited a PR #23

Open
wertzui opened this issue Aug 13, 2018 · 2 comments
Open

Feature Request: Display changes since I last visited a PR #23

wertzui opened this issue Aug 13, 2018 · 2 comments

Comments

@wertzui
Copy link

wertzui commented Aug 13, 2018

Just as in the "normal" PR-List, it would be good if you can see what changes have been made to a PR since you last visited that PR.
In addition a time stamp with the last change date would be good too.

@sand-head
Copy link
Collaborator

I've been trying off and on for a good while to figure out how to utilize the endpoint Microsoft is using when they get pull request update data in their Pull Requests tab in DevOps. I've only really come up with two things:

  • they seem to be POSTing to this API endpoint: https://dev.azure.com/{OrganizationName}/_apis/visits/artifactStatsBatch?includeUpdatesSinceLastVisit=true
  • the request body looks like this:
[
  {
    "artifactId": "vstfs:///Git/PullRequestId/{ProjectId}%2F{RepoId}%2F{PullRequestId}",
    "discussionArtifactId": "vstfs:///CodeReview/ReviewId/{ProjectId}%2F{???}"
  }
]

I can't easily figure out what that {???} is... it's a four number identifier, like the pull request ID, so maybe it's the most recent pull request topic ID? even if I were to figure it out, I would also have to discover how exactly to call this endpoint from inside of the extension, as none of the provided REST clients seem to contain it.

on the flip side, I could emulate this behavior by getting the pull request iterations, but it would only be able to signal new activity if you click a link inside of the extension. it won't know if you accessed the pull request any other way (via the Pull Requests page, or direct link). hence why I've been trying to find a way to use Microsoft's endpoint: it directly tells us both all activity and activity since last visit, so the extension wouldn't have to keep track of anything itself, nor would it have to emulate behavior. as someone who would also love this functionality, I think it would be worth doing it right.

@nshenoy
Copy link
Member

nshenoy commented Jul 8, 2019

Looks like #47 would partially address this feature. It's not exactly "since I last visited" but it shows the age of a PR which should get you most of the way there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants