For automation purposes, I needed a tool to interact with the REST API of Atlassian Jira over Powershell commands.
I found a great module developed by replicaJunction and contributors on Github called PSJira.
Installation
You will need
- Powershell
>=3.0
Install-Module PSJira
(if you have Package Management Installed Module)- and for sure, an Atlassian Jira instance
First-Run
|
|
Setup jira credentials in .ps1
Encrypt credentials (Once)
Do this with the Windows session of the user who will launch the .ps1
scripts (service account)
In your .ps1 script
Load credential, and launch a connection to Jira.
Basics commands
Examples
In my case, we created a bot called Lucy who launch tidies tasks on our Jira instance (scheduled with RES Automation Manager), she can update idle tickets for example, or automatically assign tickets to Administrators based on Jira filters, etc..
I used PowerShell’s Get-Random
function to render her speech more ‘Human’, she takes a random sentence on a simple txt file.
Automation, Automation, Automation.
That’s all folks!
zoph.