Azure DevOps project description page (a dynamic readMe file possible?) - github

I have seen some informative Azure DevOps Project description pages (readMe file), where one can see at a first glance how the whole project is performing and would like to do something similar and want to know from where the information is coming and how to keep it up to date with the latest build/deploy status?
Something I have in mind is similar to this. Especially those green / red labeled indicators, which are also found sometimes in some GitHub repository readMe pages
example 2:

The general idea is to setup a pipeline dedicated to update your README, as explained here.
This is illustrated in the official documentation "Add a status badge to your repository"

Related

How to go from "published code as a wiki" back to "provisioned wiki"?

Have read about differences of the two here: https://learn.microsoft.com/en-us/azure/devops/project/wiki/provisioned-vs-published-wiki?view=azure-devops.
Would like to try out code as wiki, however, want to have a backup plan in case I want to switch back to the provisioned one.
Once I have tried the "published code as wiki" does anyone know how to import the contents from a repo backup and make it "provisioned one"?
If you have already created a project wiki and add a code wiki, the two wiki's will coexist (see screenshot):
If the Code wiki is not the way to go, you can unpublish it only leaving the project wiki in place.
If the Code wiki is the way to go, removing a provisioned (project) wiki doesn't seem to be an option in the UI. Still, there are options to Delete default project Wiki in Azure DevOps using the API.
As another solution said, you can unpublish the Code wiki if you want to keep the project wiki.
If you want to keep only the Code wiki then you can download the project wiki as a git repo and replace all content. After having pushed the new content you can delete the (old) Code wiki.
Editing history will be lost but that is hopefully not important to you.

Is there a way to add custom "badges" to files on GitHub?

I have it in my head to help people at my company get better by finding a way to highlight and call out good code.
In particular, I'd like to be able to mark a file (not a repository or directory) as having a "gold star" (or another badge) so people browsing our source code who see the badge can see they're looking at a really good implementation they might take inspiration from.
I'm taking inspiration from the code owners feature on GitHub where there's a little padlock icon on a file if it's assigned ownership by the CODEOWNERS file.
Is it possible to do a custom "badge" on GitHub? If so, what's the API?
Browsing the GitHub documentation and searching online, I wasn't able to find anything explaining how to do something like this. Most folks were talking about the little images badges like the code coverage badges people put in their readme files.
Checkout this thread. You can submit feature request to GitLab and GitHub or in case of GitLab code your own feature and submit PR.
Here are some closely related discussions. Probably you have already seen them and are not looking for them but you might use them to get idea of how to create the feature that you want.
The Shields service (at shields.io) provides a way to create custom badges for your projects. These are badges are very common and are frequently used to show status information about the project, or demonstrate tools that were used for the development of your project. (...more)
Also checkout Bring Your Own Badge

Delete Published Wiki

I created a code wiki. Worked nicely.
Decided to take a look at published wikis so added one and then found that it overrode the code wiki (wtf?)
Then I discover that I can't go back (double wtf?)
Eventually, after much faffing about I found this:
https://learn.microsoft.com/en-us/azure/devops/project/wiki/provisioned-vs-published-wiki?view=azure-devops#delete-project-wiki
Talk about a PITA, but it worked. This morning I look at the wiki again and the empty published wiki is back.
However, the above solution no longer works. Running "az devops wiki list" just shows the single codeWiki. No mention of the projectWiki and so, I have no repositoryId to call DELETE against.
So, two questions:
How do I get back to the codeWiki?
Has there been any indication of when MS are going to fix this ridiculous manual delete situation?
You can select your wikis here:
You can refer to the document if you want to delete your wiki pages:
Code wiki:Edit, rename, or delete pages
Project wiki:Edit and delete wiki pages

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.

Using GitHub as a code repository for tutorial project

I`m planning a project, and was wondering if it would be a good idea to use GitHub as a code repository for the project.
The project is just me creating a single application step by step. In fact, it is more like me learning how to do it, and documenting my process, and letting other people tag along.
So step 1 could be setting up the project, step 2 how to organize the files, step 2 connecting to the database, step 3 how to do the UI etc. (btw. this is not how the project is set up)
The documentation would consist of a website with articles for each step and along with each step I want to enable the visitor to download/view the code for the project to the point where we are in the process.
I don`t know how top use GitHub, but I was planning on learning it as well. Would GitHub be a good way to share the code for a project like this?
Is there a way in GitHub to take snapshots, like step 1, step 2, etc., or would it be better to use branches or forks for this?
A nice feature would be the ability to correct the entire chain of steps if I find a typo in step one.
Does anyone know of an existing GitHub project that is set up in a similar way?
You could use GitHub, provided you push also tags for each significant steps.
(as explained in "How do I use github tags to create downloads for my project?")
That way, you can provide download links for each of those tags, even for the readers who don't have Git installed.
See "All of your downloads. One big button."