Coder Social home page Coder Social logo

linkyard / scenarios-for-issue Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 3.0 1.04 MB

Extends Atlassian JIRA by including gherkin scenarios from a source repository (github/bitbucket) into the issue view.

License: Apache License 2.0

JavaScript 70.47% CSS 0.40% HTML 29.00% Dockerfile 0.12%

scenarios-for-issue's Introduction

Scenarios for JIRA Cloud

Note: This is no longer supported due to changes in atlassians policies. We are unable to run the addon for you, but you may use our source code freely

Extends Atlassian JIRA Cloud by including gherkin scenarios from a github or bitbucket repository into the issue view.

Installation

  • Install from the Atlassian Marketplace
  • Setup your project:
    • Go to the administration of your project and open "scenarios integration".
    • Enter the data of the source repositry your gherking (.feature) files are kept in.
    • Make sure to use an application password (bitbucket) or personal security token for security reasons. Project Settings
  • Enable the custom fields "scenario file" and "scenario revision" for your Story issue type (or whatever issue type you're using for the scenarios).
    • If your not and experienced JIRA Administrator you can use the "Where is my field?" functionality of JIRA:
    • Open the issue you want to display the scenario on.
    • Click the "Admin" button in the toolbar and select "Where is my field?"
    • Type "Scenario File" Where is my field
    • The dialog will show you where you need to add the field to (refer to the Atlassian JIRA documentation for an explanation).
    • Click "go to 'Task Management Edit/View Issue Screen' Screen configuration settings"
    • Add the "Scenario file" and "Scenario revision" field to the screen Configure Screen

Usage

  • Edit an issue and fill the "Scenario file" and "Scenario revision":
    • file: Relative filename of the your .feature file inside your source repository (eg tests/features/my-feature.feature)
    • revision: git branch or commit id (sha). If you're not sure about it, then use master (usually the default branch in the repository)
    • Edit Issue
  • See your scenario inside your issue: View Scenario

Security

  • this addon reads issue details from Jira
  • this addon stores entity properties on the issue:
    • a flag whether the scenario fields are set
  • this addon stores entity properties on the project:
    • bitbucket/github repository identification (type, owner, name/slug)
    • bitbucket/github account (user/password). The password is encrypted with a key that is stored in the database of the addon.

The JIRA instance never has access to your bitbucket app password or github token. The same goes for the client (browser) - except when they configure a new password (only the one they have typed in the field).

For Developers

This addon may serve as an example for Atlassian Connect plugins.

It uses the following techniques:

  • node.js express based server (atlassian-connect-express)
  • embedding a webpanel (ly-issue-scenarios) into the view issue screen: atlassian-connect.json
  • adding a settings screen (projectconfig-panel) to the project settings: atlassian-connect.json
  • reacting to updates to an issue via a webhook: issue-updated.js and atlassian-connect.json
  • adding custom fields to the JIRA instance: atlassian-connect.json
  • using the JIRA REST API from our server: jira-connector.js
  • using the JIRA REST API from the webbrowser: getProjectProperty in js/project-config.js
  • using the bitbucket REST API from the server: bitbucket-connector.js / github REST API github-connector.js
  • calling our server from the browser
    • server part: encrypt in routes/project-config.js
    • client part:
      • setProjectEntityPropertyEncrypted in js/project-config.js
      • jwt in page-context.js and layout.hbs (meta tag)
  • storing settings in JIRA as entity properties
    • server part (reading): loadSettings in jira-connector.js
    • client part (reading and writing): js/project-config.js
  • storing sensitive data: see the handling of the password entity property (above)
    • server generates unique encryption key per tenant and stores it in its database
    • the encrypted passwords are stored as entity properties in JIRA
    • they can only be decrypted by the server and not in the browser
  • deployment using docker: Dockerfile

Development

To develop and test with this plugin on you local macheinge:

  • Sign-up for an development cloud instance
  • Copy credentials.json.sample to credentials.json and add your credentials from the previous step
  • Start the server using npm start
  • It'll add the plugin to your developement JIRA instance. If it does not you can manually add it in the plugin manager using the ngrok url shown at the startup (i.e. Local tunnel established at https://fb33e879.ngrok.io/)

scenarios-for-issue's People

Contributors

msiegenthaler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scenarios-for-issue's Issues

What would it take to make integration with GitLab?

I've checked every similar plugin on marketplace, but none offers integration with GitLab. I would so much want to avoid reimplementing this myself. I could probably live for a while with a home-made solution, but would really not want to support it long-term. Are you guys planning on adding that?

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.