Is it possible to deep link to a specific revision of an Azure DevOps wiki page? - azure-devops

I would like to generate a hyperlink to a read-only view of a specific revision of an Azure DevOps wiki page. The links provided on the Revisions page navigate to a commit review page with compare and preview tabs and include a Revert button (when permitted).
I have tried
https://dev.azure.com/[organization]/[project]/_wiki/wikis/[project].wiki?pagePath=%2Fpath%2Fto%2Fpage&version=[ETag] but the version is ignored and the latest revision is displayed.
https://dev.azure.com/[organization]/[project]/_wiki/wikis/[project].wiki?pagePath=%2Fpath%2Fto%2Fpage&version=[commithash] but the version is ignored and the latest revision is displayed.
https://dev.azure.com/[organization]/[project]/_wiki/wikis/[project].wiki?_a=compare&wikiVersion=GBwikiMaster&pagePath=%2Fpath%2Fto%2Fpage&version=[ETag]&view=preview which is viable but undesirable due to the risk of misguided reverts.

If you only set read-only permissions on Wiki security, the page you get using the third form of link has no Revert button, so there should be no risk of misguided reverts.

Related

Github wiki in showing old versions

Is there a way to view old historic revisions of wiki on github?
Here it says,
You can access the old rendered version, but not the source
But I found I can access neither the old rendered version, nor the source via github web.
UPDATE/Conclusion:
Thanks to VonC's answer, it turns out that GH might have disabled such feature in new repo/wiki --
This is a wiki history from one of my old repo
This is a wiki history from my brand new repo created several days ago
The mouse is over SHA-1 hash but there is no link there.
The Wiki documentation has a "Viewing previous content" section:
On the wiki history table, you can click a SHA-1 hash (the sequence of letters and numbers to the far right) to see a wiki page as it existed at a particular point in time.
This is after clicking on the revisions of a wiki page.
So you can access past rendered content that way.

Display recent activity to a section of the wiki in an Azure DevOps project

We're moving our wikis over to Azure DevOps and want to replicate the 'overview' pages we have for each section of the wiki. This is comprised of a table with links to various files (which was easy enough to create in markdown), followed by a list of recent updates to pages within that section (showing which team member made the update, which page was updated, and the date).
Azure DevOps doesn't appear to let you run queries on wiki pages within a project, which was my initial approach. I therefore need some markdown that will return a list of the above information (say, the last ten updates made to a specified page of the wiki and any of its sub-pages). Is this possible? Or is there a better way to get the result I'm after?
Display recent activity to a section of the wiki in an Azure DevOps project
I am afraid this is impossible at this moment.
If you want to return a list of the last ten updates made to a specified page of the wiki and any of its sub-pages, there is a option View Revisions, which you could get wiki page history:
Revision pages show who made the change along with the revision
message, date, and version or commit ID. To view details of a
revision, select the message or version link.
Check the document View wiki page history and revert changes for some more details.
But we could not get the update list for all wiki pages, just for one specify.
Besides, the functions supported by markdown are limited currently, AFAIK, we could not dynamic Wiki Content, if we need to list the update list for all wiki pages, it should be the dynamic content:
Check the user voice Add dynamic Wiki Content.
The way I can think of is that we could create a scripts to invoke REST API to return the updates made to a specified page of the wiki, then add the result to the markdown in the local, and push the changes to the Azure devops. But this will add a update message in the Wiki.
So, I am afraid this is impossible at this moment.
Hope this helps.
If you want to see recent wiki page changes, look in the DevOps Repos -> Commits page in the GUI.

How to recover a very small section of work from github pages after github erases it, after a commit and sync?

I added a small section to my portfolio, Skill Set, and after I made a commit sync and published it I can't find it on my laptop and it's not on the repository on github.com but it's still on my site which is hosted by github pages. Is there anything I could do to recover this really small section of my portfolio?
www.keithcarrillo.com . At the bottom of the one page portfolio is my skill set section.
First, do check your git reflog to see if you find a commit with a message regarding skill set: you might get it back that way (with git cherry-pick).
If that is not working, you can at least create a new commit with the content you can still scrap form your website.

Viewing a separate branch of GitHub Page

I have recently started using a GitHub repository to work on a personal web project, since GitHub allows me to host a website via GitHub Pages.
Is there a way to view a separate branch of this web project in my browser, just like I can view the master branch by accessing the URL [username].github.io? Otherwise, I find it difficult to really make use of the GitHub workflow since I'd have to commit changes to the website directly to the master in order to view them in the browser rather than reviewing changes in a separate branch.
Not that I can see. You can only view pages from:
gh-pages branch
or since August 2016, from master, or master:/docs
But each time, GitHub pages will reflect the content of one source, not giving an easy way to switch between branches.
A workaround would be to have a separate account, for a separate [username-review].github.io domain, allowing you to publish first in that second site, before pushing to the first one.

How do I create a "Revision page" with the GitHub API?

I would like to create a "Revision page" where the people can see on what I've been working using GitHub there's an example about what I mean:
It is supposed to show the commits from my GitHub repository.
A) More information is required
Firstly, could you clarify if it is your intention to
Show the Commit history for a single repository, or
You wish to show your commit activity across multiple repositories
Also:
You wish to have this information displayed on Github, or
You
wish to have this information displayed on an external site.
B) Displaying information on GitHub
If the intention is a combination of 1 and 3, then my first suggestion would be to check the existing functionality of GitHub, which has such a feature built-in.
This can be accessed by navigating to your repository, and simply clicking the Commits button. An example of the results can be found here:
Example GitHub Commit History
C) Displaying information on an external site
As you mention that you have limited experience with PHP, I would certainly start by evaluating GitList:
GitList allows you to browse repositories using your favorite browser,
viewing files under different revisions, commit history and diffs.
GitList is free and open source software, written in PHP, on top of
Silex and the Twig template engine.
If you feel confident that you could create your own solution to display the information in an external web page, then you should begin by familiarising yourself with the GitHub Developer Documentation, and specifically:
List commits on a repository
It is also worth examining the following article and existing GitHub project in order to enhance your knowledge:
How to Use Github’s API with PHP (SitePòint Article with code)
GitHub PHP Client (GitHub Project)
It may be that you can clone one of these projects, strip it down to the features essential for your needs, and customise the UI.