better pull request manager for azure dev ops - azure

I am using Pull Request Manager Hub from the marketplace for our azure dev ops projects/repos. id like something that has a cleaner UI. It seems too busy and like everything is a button and some of the icons don't show up completely. I don't want to complain too much but is anyone using something else that they like more? My main requirement is that I should be able to see all pull requests across repositories in the same project.

I’m the creator of Pull Request Manager Hub and new improvements (better UI, lots of new features) have been released to address some of the main complains. Also, feel free to open issues in the GitHub repo where we try to fix as soon as possible.
Thanks ;-)

My main requirement is that I should be able to see all pull requests
across repositories in the same project.
For this demand , you can use Pull Request Search extension. This extension allows pull requests to be filtered by status, creator, reviewer, title, start date, end date, and repository. You can specify different repos in the same project in the Repo drop-down list.
Another extension Pull Request Dashboard can also view pull requests across all repositories. But it has a flaw, you can only see the pull requests with active status.

https://marketplace.visualstudio.com/items?itemName=mimeo-vs-marketplace.mimeo-active-pull-requests has a plugin called 'All Active Pull Requests' (among others) is the best I have found so far.

Related

Azure DevOps Create Work Item From Selected Code

I want to preface this with I tried to submit this in the developercommuinty.visualstudio.com Request a feature section and it wouldn't upload due to server errors, 403 and bad requests.
On-prem DevOps version: Server 2020 (18.170.30331.4)
Scenario
I was going through some code with another team as they were asking questions it. The code in question was connecting to a database and then querying a different database. So now, a bug has been identified and I was looking to create one that calls out this specific line of code. When highlighting it in the repo and right clicking, there wasn't a way to create a task from it.
Expectation
I was expecting a similar experience to what GitHub has and create a work item that points to the specific line of code.
Suggestion
Mirror that similar functionality from GitHub in Azure DevOps when selecting lines in the repo and being able to create a work item from it.

GitLab change permission of protected branches

We recently migrated to GitLab Self Hosted (V14.3.0)
We migrated 100+ repos to Gitlab and then we realized, by default only maintainers have write access to Gitlab protected branched.
Is there a way to change the following setting in one shot for multiple repositories or we will have to manually change for every repository?
We want to change "Allowed to merge" from "Maintainers" to "Developers + Maintainers"
In the main group we have set it to the following, I was hoping that this will make it work but no luck -
Well manually will be a bad approach, but the GitLab API offers a lot of functionality regarding that problem. I will not write the script, but i will outline you the APIs you can use and why you use them.
Fetch a list of all projects you want to change - the Projects API
GET /projects
With this endpoint you will receive a list of all the projects within you instance, on which the user has access - be aware that this is a paginated request - so just calling it once will not be sufficient.
Adapt the Protected branches - the Protected Branches API
With the project IDs from the first part you can now query each project and change the protection. We ended up with first deleting the protection and recreating them, because it has proven to be easier.
Anyway i recommend to automate this with a script, and do it rather sooner than later. As some projects might start with custom protections, and this can make the migration harder.
the GitLab API offers a lot of functionality regarding that problem
Actually, GitLab 15.6 (November 2022) does provide said API:
Update access levels from Protected Branch API
Previously, the UI was required to update the access levels of protected
branches. The API required you to unprotect, then reprotect, a branch when
updating its access levels.
Now, the
protected branches API
enables you to directly update which users or groups are allowed_to_push, allowed_to_merge,
allowed_to_unprotect, and more.
This one-step method decreases the risk of a bot
changing this setting and leaving a branch unprotected.
See Documentation and Issue.

Github API: How to get list of users who have starred a repo AND cloned it

I'd like to get a list of users who have starred my public repo and a number of fields related to them such as whether or not they have cloned it. Is this possible with the Github API?
The endpoint for stargazers is:
https://api.github.com/repos/:owner/:repo/stargazers
for eg, if you want to get users who starred the repo https://github.com/suhailvs/django-schools/ you can use:
https://api.github.com/repos/suhailvs/django-schools/stargazers
The endpoint for stargazers (users who have starred a repo) is documented here in the documentation. You can follow with additional requests on those users.
Checking whether people have cloned a repo is impossible (you don't even need to be logged in to clone a git / GH repo). You can, however, list the forks of a repo.
Github webhook services are fairly detailed and you can really get a lot of information from them but gleaning if someone cloned your repo is a bridge too far. As far as I'm aware, there's no way to track that (you can track new forks). I'd recommend using a webhook to track new repo watches to accomplish at least some of what you're looking for.
Axibase has a tool which leverages Github webhooks, and notifies you via email or instant message (through the messenger of your choice) when someone stars your repository.
The underlying process is here:
It's a quick setup, the whole process takes less then 10 minutes. Basically you need to create a plaintext file with your email / messenger credentials on your local machine, launch an ATSD sandbox from the terminal, and paste the webhook generated at runtime into the appropriate field on Github. The full process is here.
Disclaimer: I work for Axibase

Is there a way to programatically pull the sprint number from JIRA from CLI or Groovy?

I want to automate our build so that we usually don't have to fiddle with our versions. Our versions follow the format:
${YY}.${Quarter}.${Sprint}.${patch}
Seems like I should be able to reach out to JIRA and grab that sprint number.
Jira has a REST API that also exposes board and sprint info.
Ie. GET /rest/agile/1.0/board/{boardId}/sprint
You can also add the state query parameter to only get the active sprint as mentioned in the docs.
It frequently happens that buildscripts also need info from commit messages or from jira issues for which code changes were made. All of these are accessible through apis like git cli, bitbucket/jira rest api, ...

push local gitlab site issues and comments to remote repo

I've been using git for a little while now in a new project I am working on.
I decided to use GitLab.com as I would like the opportunity to keep me repos private until I'm ready to share them (which github doesn't allow me to do).
The whole beauty of git for me is that I have a copy of the whole repo on my local machine and on the remote site.
However I make lots of comments, on my 'local' gitlab instance.
I know that I can put the wiki into source control, is it possibly to do the same thing with the comments and milestones (or in some other way share them between repositories)
I feel that this should be possible.
Maybe using an rss feed to push and pull the data to / from the various locations.
Or can I use the issues as a 'mailing list' somehow, with a 'mail into list' (however I would then need to get my local gitlab instance to mail any new issues to the remote - could probably be setup using some form of 'auto forward' filter in my mail client / gmail.
Are any of these ideas even possible ?
Is there a better solution - I'd prefer something that will integrate into my gitlab instance (local and remote), rather than needing having to use a separate interface ~ I like everything to be in a single place if possible.
Remember also I like to have access to my issues etc when offline (and then have them 'sync' when I go back online).
Thanks for any help in advance.
David
You could build a script and make use of the API to sync your issues and notes. Maybe a script that pulls all of the new issues and notes and POSTs them to the equivalent projects on GitLab.com. You could run the script manually or create a cron job to post the new items periodically.

Resources