Coder Social home page Coder Social logo

atlassian-cli's Introduction

Atlassian CLI

This program is an easy-to-use, scriptable API for interacting with JIRA (and eventually other Atlassian products) via the REST API.

Whenever possible, this CLI will implement a "pure JSON" option for input and output, allowing maximum machine-parsability. RecordStream is a huge potential candidate for using with the atlas-cli.

Usage

SYNOPSIS

atlas-jira-cli --help # for full help page

atlas-jira-cli jql "assignee = someuser and project = QA and created > -1d"
atlas-jira-cli view QA-1234
atlas-jira-cli transition QA-1234 --editState close
atlas-jira-cli edit QA-1234 --fix-versions='+1.1.1' --fix-versions='-1.1.0' --comment "bumping to a later release"
atlas-jira-cli comment QA-1234 --comment "This is harder than I thought!"
atlas-jira-cli create --project-key QA --summary "File all the tickets!" \
        --description "Meme of the year, amirite?" \
        --priority p1 \
        --components regression \
        --affects-versions 1.0.0 \
        --affects-versions 1.1.0 \
        --fix-versions 1.1.1

Setting up with RVM

Since atlassian-cli requries a custom version of the terminal-table gem, it must always be executed with bundle exec.

To set this up, it is advised you do the following:

rvm install ruby # if not already done, will grab newest c-ruby
rvm use ruby@atlascli --create
gem install bundler # may be needed
bundle install
# create a bash script in your path, obviously adjust the paths to point to
# your rvm directory and your checkout of atlassian-cli

#!/bin/bash
ATLAS_CLI_DIR=/home/$USER/gitrepos/atlassian-cli
RVM_DIR=/home/$USER/.rvm
GEMSET=ruby-2.0.0-p195@atlascli
cd $ATLAS_CLI_DIR && $RVM_DIR/bin/$GEMSET -S bundle exec $ATLAS_CLI_DIR/bin/atlas-jira-cli "$@"

# you may also have to run this once for each ruby to generate the stubs, depending on your rvm version:
rvm wrapper ruby@atlascli

Authentication

Initially, the script will prompt for a username and a password. If you don't want to type it in every time you can store credentials in your ~/.netrc file using the standard format (see man netrc for details).

DEV GUIDE

To run an instance of jira for testing using the atlassian plugin sdk

atlas-run-standalone --server localhost --product jira --version 5.2.11

Note that you have to create the project and some issues first... intial db is empty.

To hit an endpoint using curl, for example:

curl --user admin:admin 'http://localhost:2990/jira/rest/api/2/search?jql=project%3Dfoo'

TODO

There are many things I'd eventually like to implement. For now, they are broken up by product.

BUGS

  • Create new issue with no component/type, try to edit it, profit?

JIRA

Confluence

  • Fetch raw page, upload raw page
  • vim/emacs integration

Stash

  • Search for projects/repositories
  • Search for pull requests
  • Create pull request
  • Permissions admin?

Generic

  • Support using a session cookie to cache credentials (p0, otherwise the CLI puts undue load on crowd/ldap)
  • TEST COVERAGE
  • Implement oauth support?
  • Support mac OSX keychain?

Bamboo

  • Search / list builds
  • Trigger builds
  • Fetch artifacts / logs

Crowd

  • Test auth credentials
  • Administration?

Fisheye

  • lol, jk

atlassian-cli's People

Contributors

newren avatar terabyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.