az-pr

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 1 Imported by: 0

README

AZ-PR

forthebadge forthebadge forthebadge forthebadge forthebadge

A go cli for wrapping up azure cli pr creation, eliminating the need to do in the web-ui or clunky git aliases.

Disclaimer

It's a wrapper and done with limited time so lots to cleanup, but since it's replacing a bash script it's still better than nothing! 😀

Feel free to create a PR or an issue for any issues experienced and if I can improve it I will. Hope it helps you out in your workflow a bit and helps you avoid the Azure DevOps web ui a litle bit longer.

Install

Use Go 1.18+. This should grab the latest tagged version. Upgrade the same way.

go install github.com/sheldonhull/az-pr@latest

Check Requirements

You need to have an access token configured, so this will check and make sure the requirements to run are setup correctly.

az-pr check

Install from Source With Go

If you don't have Go tools typically setup, then here's something to add your profile to make sure the binary is found. This would be your $HOME/.zshenv or $HOME/.bashrc.

export PATH="$(go env GOPATH)/bin:${PATH}"

Find this file by typing code $PROFILE in a PowerShell prompt to open/create it on demand. This profile is different depending on where you load it from, so VSCode has a unique profile as well as a normal terminal. Profile Files

$GOPATH=&go env GOPATH
$ENV:PATH = '{0}{1}{2}' -f (Join-Path $GOPATH 'bin'), [IO.Path]::PathSeparator, $ENV:PATH

Why

I could do this in a shell script (which I've done), but wanted to make it easy for a Go dev to run with a nice prompting experience that was compatible with Linux/MacOS/Windows. I use conventional commits in all repos, and this should make it much easier to create pull requests without dealing with the web-ui.

In addition, it will set auto-complete and link work-items.

Why A Wrapper

The cli has a lot of logic already built in. I couldn't find a documented Azure DevOps Go SDK for repos.

Might redo with API calls, but the cli is an easy quick win. 😀

Documentation

Overview

Copyright © 2023 Sheldon Hull

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL