Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
ASP-56: rebrand as JIRA Cloud for Sketch
Browse files Browse the repository at this point in the history
  • Loading branch information
kannonboy committed Aug 29, 2017
1 parent 552058f commit 56d0823
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .gitignore
@@ -1,7 +1,7 @@
# build artefacts
atlassian.sketchplugin/Contents/**/*.js
atlassian.sketchplugin/Contents/**/*.json
!atlassian.sketchplugin/Contents/**/config.json
jira.sketchplugin/Contents/**/*.js
jira.sketchplugin/Contents/**/*.json
!jira.sketchplugin/Contents/**/config.json

# npm
node_modules
Expand Down
Expand Up @@ -214,7 +214,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Copy .js to .framework/.js\nRESOURCES_TARGET=${SRCROOT}/../atlassian.sketchplugin/Contents/Resources/${FULL_PRODUCT_NAME}\nrm -rf ${RESOURCES_TARGET}\ncp -r ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME} ${RESOURCES_TARGET}";
shellScript = "# Copy .js to .framework/.js\nRESOURCES_TARGET=${SRCROOT}/../jira.sketchplugin/Contents/Resources/${FULL_PRODUCT_NAME}\nrm -rf ${RESOURCES_TARGET}\ncp -r ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME} ${RESOURCES_TARGET}";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
35 changes: 18 additions & 17 deletions README.md
@@ -1,6 +1,6 @@
# Atlassian Sketch Plugin
# JIRA Cloud for Sketch

A [Sketch] plugin that provides integration with Jira Cloud.
A [Sketch] plugin that provides integration with JIRA Cloud.

The plugin is available for download from [sketch.atlassian.com].

Expand All @@ -12,7 +12,7 @@ The plugin is available for download from [sketch.atlassian.com].
- `skpm build` to transpile and package the plugin
- `skpm link .` to symlink the plugin to the Sketch plugins directory

When you next start Sketch, there should be a **Jira** option in the
When you next start Sketch, there should be a **JIRA** option in the
**Plugins** menu.

To subsequently update the plugin, simply run `skpm build` and restart Sketch.
Expand All @@ -31,23 +31,23 @@ Builds are continuously built by Bitbucket Pipelines. See
`bitbucket-pipelines.yml` and `bitbucket-pipelines.sh` for details. Builds are
automatically uploaded to S3:

- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-latest.zip is the tip of `master`
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-release.zip is the latest tag
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-{TAG}.zip is a particular tag
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-{SHA}.zip is a particular commit
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-latest.zip is the tip of `master`
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-release.zip is the latest tag
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-{TAG}.zip is a particular tag
- https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-{SHA}.zip is a particular commit

The build environment is defined by the `Dockerfile` in the repository root.

If you want to cut your own build to send to a friend, simply run `skpm build`
(or `./build.sh` if you've modified any Objective-C files) and then zip the
`atlassian.sketchplugin` directory.
`jira.sketchplugin` directory.

## Architecture

### Frontend/Backend

The plugin 'backend' uses [CocoaScript] to implement Sketch commands, store
user preferences, make requests to Jira, add controls to the Sketch UI, and
user preferences, make requests to JIRA, add controls to the Sketch UI, and
spawn Cocoa `NSPanel`s and `WebView`s that render the 'frontend'. The frontend
is client-side JavaScript that runs in a `WebView` (that is, Safari) context.
'Backend' and 'frontend' are in quotes because they aren't a traditional
Expand Down Expand Up @@ -77,22 +77,23 @@ frontend context.
### Persistence

Most configuration is stored in user modifiable file at
`atlassian.sketchplugin/Contents/Resource/config.json`. This file is read once
`jira.sketchplugin/Contents/Resource/config.json`. This file is read once
at startup (see `src/config.js`), so Sketch will need to be restarted to pick
up any modifications.

Properties and settings that are modified at runtime are stored in a macOS
`plist` that lives at `~/Library/Preferences/plugin.sketch.jira-sketch-plugin`
(see `src/prefs.js`).

### Jira authentication and integration
### JIRA authentication and integration

The plugin uses a companion [Atlassian Connect] add-on to integrate with Jira.
The add-on allows a user to securely link a plugin instance to their JIRA Cloud
account via an OAuth-like 'dance' and subsequently providing [bearer tokens] for
plugin instances to authenticate directly with the Jira REST API (see `src/auth.js`
and `src/jira.js` for details). The companion add-on is a system add-on, and will
be automatically installed in any given Jira Cloud instance.
The plugin uses a companion [Atlassian Connect] add-on to integrate with JIRA
Cloud. The add-on allows a user to securely link a plugin instance to their
JIRA Cloud account via an OAuth-like 'dance' and subsequently providing
[bearer tokens] for plugin instances to authenticate directly with the JIRA
REST API (see `src/auth.js` and `src/jira.js` for details). The companion
add-on is a system add-on, and will be automatically installed in any given
JIRA Cloud instance.

### Logging

Expand Down
6 changes: 3 additions & 3 deletions appcast.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Atlassian Sketch Plugin</title>
<title>JIRA Cloud for Sketch</title>
<link>https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/appcast.xml</link>
<description>Share from Sketch to JIRA, without losing focus</description>
<language>en</language>
Expand All @@ -14,7 +14,7 @@
</ul>
]]>
</description>
<enclosure url="https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-0.0.9.zip" sparkle:version="0.0.9" />
<enclosure url="https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-0.0.9.zip" sparkle:version="0.0.9" />
</item>
<item>
<title>v0.0.8</title>
Expand All @@ -29,7 +29,7 @@
</ul>
]]>
</description>
<enclosure url="https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/jira.sketchplugin-0.0.8.zip" sparkle:version="0.0.8" />
<enclosure url="https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/atlassian.sketchplugin-0.0.8.zip" sparkle:version="0.0.8" />
</item>
<item>
<title>v0.0.7</title>
Expand Down
2 changes: 1 addition & 1 deletion bitbucket-pipelines.sh
Expand Up @@ -14,7 +14,7 @@ skpm build
# run the tests
npm test

export PLUGIN_NAME="atlassian.sketchplugin"
export PLUGIN_NAME="jira.sketchplugin"
export PLUGIN_ZIP="${PLUGIN_NAME}-${BITBUCKET_COMMIT}.zip"
export S3_BUCKET="atlassian-sketch-plugin"
export S3_BUCKET_URL="https://s3-us-west-2.amazonaws.com/${S3_BUCKET}"
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "atlassian-sketch-plugin",
"name": "jira-cloud-for-sketch",
"version": "0.0.9",
"description": "Share designs, assets, and feedback with your team",
"main": "atlassian.sketchplugin",
"main": "jira.sketchplugin",
"manifest": "src/manifest.json",
"resources": [
"src/views/web/connect/connect.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"jira"
],
"author": "Tim Pettersen <tim@atlassian.com>",
"license": "BSD-2-Clause",
"license": "Apache-2.0",
"homepage": "https://bitbucket.org/atlassian/jira-sketch-plugin#readme",
"engines": {
"sketch": ">=3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
@@ -1,5 +1,5 @@
{
"name": "Atlassian Sketch plugin",
"name": "JIRA Cloud for Sketch",
"author": "Atlassian",
"email": "tim@atlassian.com",
"appcast": "https://s3-us-west-2.amazonaws.com/atlassian-sketch-plugin/appcast.xml",
Expand Down
2 changes: 1 addition & 1 deletion src/plugin-state.js
Expand Up @@ -3,7 +3,7 @@ const keys = {
exportSelectedLayersFn: 'exportSelectedLayersFn'
}

const dictionaryKey = 'atlassian-sketch-plugin-state'
const dictionaryKey = 'jira-sketch-plugin-state'

const pluginState = (function () {
let _state = NSThread.mainThread().threadDictionary()[dictionaryKey]
Expand Down
2 changes: 1 addition & 1 deletion test/web/issues.test.js
Expand Up @@ -12,7 +12,7 @@ import { issueFromRest } from '../../src/entity-mappers'
const issues = require('./issues.json').issues.map(issueFromRest)
const profile = require('./profile.json')

const root = path.join(__dirname, '/../../atlassian.sketchplugin/Contents/Resources')
const root = path.join(__dirname, '/../../jira.sketchplugin/Contents/Resources')
new HttpServer({root}).listen(8080)

let driver
Expand Down

0 comments on commit 56d0823

Please sign in to comment.