Skip to content
Connect your code with your project management in Jira
JavaScript HTML Ruby Other
Branch: master
Clone or download
jnraine Improve unicode whitespace handling
This improves how the tokenizer matches whitespace. Prior to this commit, it didn't match Unicode whitespace as whitespace. There's some history here.

1. The `whitespace` pattern must exclude newline and carriage return characters because they are used to delimit commands and must be matched separately. In order to accomplish this before now, whitespace characters were listed explicitly. This list didn't include unicode whitespace characters.
2. The `notWhitespace` pattern needed to match any characters that `whitespace` didn't. This meant it needed to match Unicode whitespace characters, which led to the previous pattern. More details on this the history here: c8ea4ec

If characters didn't match at least one of those patterns, it caused a syntax error.

Taking a fresh look at this code today, I realized a better, albeit brain-twisting, solution: match using a negated character set that includes non-whitespace (`\S`) and `\r\n`. This precisely excludes `\n\r` while including other unicode whitespace characters.

I've added more sanity checks to ensure whitespace characters don't cause syntax errors.
Latest commit 1bf944c Oct 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Make debugging in VS Code easy (#248) Aug 23, 2019
bin Exit 0 when successful (#288) Oct 8, 2019
datadog Add prerun script to get datadog hooked up to heroku resources (#146) Nov 20, 2018
db Truncate issue keys and show warning to user (#258) Aug 30, 2019
docs Create permissions documentation (#140) Nov 28, 2018
lib Improve unicode whitespace handling Oct 10, 2019
script Add Datadog histogram for GitHub requests Sep 9, 2019
static Truncate issue keys and show warning to user (#258) Aug 30, 2019
test Improve unicode whitespace handling Oct 10, 2019
views Truncate issue keys and show warning to user (#258) Aug 30, 2019
.env.example Don’t catch errors in development Aug 13, 2019
.eslintrc.json Linter fixes (#134) Oct 24, 2018
.gitignore
.sequelizerc Store Jira installation details in Postgres. Jun 13, 2018
.travis.yml Fix non-default branch commit history sync + Batch commit payloads to… Oct 9, 2019
Brewfile Add script/server Aug 13, 2019
CODE_OF_CONDUCT.md Initial Probot app May 14, 2018
CONTRIBUTING.md Add script/server Aug 13, 2019
LICENSE Initial Probot app May 14, 2018
Procfile Setup `worker` process Aug 27, 2018
Procfile.dev Move nodemon into `package.json` to avoid having to install it globally Aug 13, 2019
README.md Update Smart Commits link to point to JIRA doc (#217) Aug 2, 2019
SUPPORT.md Make copy changes from PR review Sep 6, 2019
app.json add in missing values Jul 3, 2018
app.yml Create app.yml Jun 13, 2019
newrelic.js Setup New Relic (#81) Sep 28, 2018
package-lock.json Add Datadog histogram for GitHub requests Sep 9, 2019
package.json Fix non-default branch commit history sync + Batch commit payloads to… Oct 9, 2019

README.md

GitHub.com + Jira Software integration

Build
Build Status

About

Connect your code with your project management in Jira. A separate Jira subscription is required. With two of your most important tools connected, you'll spend less time managing projects and more time working on them. This integration is an open source project, built and maintained by GitHub.

Table of Contents


Installation and setup

Requirements

This app officially supports GitHub.com and Jira Cloud. Support for GitHub Enterprise and/or Jira server may be considered in the future.

Installation from Atlassian

  1. Sign into your Jira Cloud account
  2. Open the left sidebar by clicking on Personal Settings, if the left side bar is not already open. From the left sidebar in Jira, select Jira Settings -> Apps -> Find new Apps. (If you're using an older version of Jira, you won't have a left sidebar. Instead, click the Gear Icon in the top-right corner and select Settings. From there, select Manage add-ons from the left sidebar.)
  3. Search for GitHub for Jira and Click Install image
  4. Click the Get Started button to connect your GitHub account.

Next you will need to connect your GitHub organization to Jira, see the following steps.

Installation from GitHub Marketplace

  1. Go to https://github.com/marketplace/jira-software-github
  2. Complete the (free) order for your GitHub Organization
  3. On the installation setting screen, choose which repositories you want to use with the Jira Integration and press Save: image
  4. Once installation completes, you will be redirected to https://jira.github.com/github/setup. Enter the site name for your Jira instance here and click Continue
  5. Once on the Atlassian add-on page, click Install.
  6. Once the add-on is installed, click the Get Started button.

Connecting your GitHub organization to Jira

As part of the installation flow you should be directed to install the Jira app on GitHub to your organization. You can also manage existing connections or add additional organizations any time within the Manage Add-ons section of your Jira settings: image

Selecting GitHub repositories

If you originally gave the app access to "All repositories" and you've created a new repository on GitHub after installing the GitHub integration for Jira, your new repository will automatically work with the integration. If you installed the app on a subset of repositories, the app will need to manually edit your repository selection by:

  1. Sign into your Jira Cloud account
  2. From the left sidebar in Jira, select Jira Settings -> Add-ons -> Manage Add-ons -> GitHub -> Configure
  3. Select Configure next to the relevant organization

Authorization

By granting the app access, you are providing the following authorizations to your GitHub and Jira accounts:

Jira Permission Scopes

Read, Write, and Admin for Development Information (branches, commits, and pull requests)

GitHub Permission Scopes

Permission scope Why we need it
Read access to code & metadata To sync development information to Jira
Read and write access to issues and pull requests To power Smart Commit actions and unfurl Jira URLs

Using the integration

Development information in Jira

To access the development information in Jira...

Take action using Smart Commits

Smart Commits are documented on the Atlassian site and allow you to comment on Jira issue in commit messages, branches, and pull requests. For example: [JRA-123] fix typo will be sent through to Jira and appear in the Development Information section of the Jira issue with the key JRA-123

example image

Link issues in github

If an issue body contains a valid Jira issue key on your instance, the integration will automatically expand it into a reference link when surround in brackets []. For example: [JRA-123] will be turned into a link to https://<your-instance>.atlassian.net/browse/JRA-123 . Markdown references are only visible when editing an Issue/PR comment, and appear at the bottom of the text area:

image

This makes it so Jira issues can be linked inside a comment without it interrupting the flow of the comment as a whole.

Manage Jira Subscriptions

New

Admins of an installation can view and delete subscriptions to other Jira instances, without having to log in to the Jira instance itself:

image

This is useful if your installation is setup to send Development information to an instance you no longer have access to, or to audit instances other admins in your org may have previously configured. This only gives you the permission to delete the connection, and will not give you access to the instance itself. You will still need to be granted access in Jira if you want to be able to view the Development information that's been sent to that instance.

Migrating from the DVCS connector

Existing users of Jira's built-in DVCS connector that meet the requirements should migrate to this integration. If you've not yet been prompted to do so, you can manually kick off the migration by:

  1. Sign into your Jira Cloud account
  2. From the left sidebar in Jira, select Jira Settings -> Applications -> DVCS accounts.
  3. Follow the prompt to upgrade your GitHub connection

Questions? Need help?

Take a look through the troubleshooting steps in our support guide.

Contributing

Want to help improve the integration between GitHub and Jira? Check out the contributing docs to get involved.

License

The project is available as open source under the terms of the MIT License.

When using the GitHub logos, be sure to follow the GitHub logo guidelines.

You can’t perform that action at this time.