Using Kitsune

Issue links with GitHub, GitLab and Jira

Sign in to GitHub or GitLab, or connect Jira, see the issue behind each task, link tasks to issues and create issues from tasks.

Kitsune links the tasks of a change (tasks.md) or a work unit (plan.md) to issues in GitHub, GitLab or Jira. It writes the link into the task line, so your team sees it in Git and in any editor. The reader shows whether the issue is still open.

Sign in with GitHub or GitLab#

For github.com and gitlab.com you don't need a token.

  1. Open User settings → Integrations and choose Connect.
  2. Pick the provider.
  3. Choose Sign in with GitHub or Sign in with GitLab.
  • GitHub shows a one-time code. Choose Open github.com. Kitsune copies the code and opens GitHub's device page, where you paste it and approve Kitsune. Kitsune gets access to the repositories your GitHub account can open.
  • GitLab opens gitlab.com in your browser. Approve Kitsune there, and the page tells you to return to Kitsune.

The dialog then says Signed in as and your account, and the host is listed as Signed in. Cancel or Escape stops the sign-in at any time and saves nothing. If you don't approve within 15 minutes, the sign-in stops on its own.

One sign-in covers everything on that host: issue links, and cloning, fetching and publishing projects whose origin is an HTTPS URL on github.com or gitlab.com and that have no login or token of their own. A project's own token still takes priority. Kitsune refreshes a GitLab sign-in by itself. If GitLab stops accepting it (for example after you revoked Kitsune there), the row asks you to Sign in with GitLab again.

If your GitHub organization restricts OAuth apps, an owner may have to approve Kitsune before you can see the organization's private repositories. You can also choose Use a token instead.

Connect with a token#

GitHub Enterprise Server and self-managed GitLab always use a token. For github.com and gitlab.com, choose Use a token instead in the form.

  1. Pick the provider: GitHub (github.com or GitHub Enterprise Server) or GitLab (gitlab.com or self-managed GitLab).
  2. Enter the host. It defaults to github.com or gitlab.com; for your own server enter its name, such as git.acme.dev. You can only connect HTTPS hosts.
  3. Paste a personal access token. The form links to the token page of that host:
    • GitHub: a fine-grained token with the repository permission Issues: Read and write. A classic token needs repo, or public_repo if you only use public repositories. For pull requests from builds, add Pull requests: Read and write, Checks and Commit statuses: Read, and Actions: Read.
    • GitLab: a personal access token with the scope api. A token with read_api can only read issues.
  4. Choose Connect. Kitsune first checks the token with the host and shows Connected as with the account it belongs to. If the host refuses the token, doesn't answer or isn't GitHub or GitLab, the form says so and nothing is saved.

User settings, Integrations: github.com connected, and the Connect form for a self-managed GitLab host

Connect Jira#

Choose Jira as the provider and enter your Jira site, such as acme.atlassian.net or jira.acme.dev. Jira has to answer at the root of its host. You can't connect a Jira under a path such as tools.acme.dev/jira yet.

  • Jira Cloud (picked for *.atlassian.net): enter the Atlassian account email and an API token you create in your Atlassian account (the form links to the API token page). A token without scopes works. A token with scopes needs read:jira-work, write:jira-work and read:jira-user. To use a board as the source of My issues it also needs read:board-scope:jira-software, read:project:jira and read:issue-details:jira. Kitsune tries your site first. If the site refuses a token with scopes, Kitsune goes through Atlassian's API gateway for that site.
  • Jira Data Center (picked for any other host): a personal access token from your Jira profile (Jira 8.14 or later).

If your Cloud site has its own domain, switch to Jira Cloud by hand. The token must belong to an account that can browse and create issues in the project. The row shows the account's display name, for example Jira Cloud · as Lin Tanaka.

User settings, Integrations: github.com and a Jira Cloud site connected, and the Connect form for Jira Data Center

Each host is listed with its provider, its account and how it's connected (Signed in or Token). Test connection checks the stored token again. Remove deletes it from your computer. Removing a GitLab sign-in also asks GitLab to revoke it. GitHub keeps Kitsune authorized until you revoke it under Settings → Applications on github.com (Kitsune links there). Links already written in task files stay.

The issue repository#

Each project has one issue repository. By default it's the repository of the project's Git origin, if that host is connected. To use a different one, choose the repository in the Issues bar:

  • a repository on a connected host, written as owner/name (on GitLab the full group path, such as acme/web/kumo);
  • or a Jira host and a project key, such as KUMO.

Kitsune checks that it exists and that your token can see it. Kitsune never takes a Jira project from the Git origin, so you choose it once per project. Use the Git origin goes back to the default when the origin's host is connected. Your choice is kept on your computer.

Issues in the reader#

Open a change's tasks.md or a work unit's plan.md. The reader shows the issues right next to the tasks:

  • The Issues bar under the document header shows how many tasks have an issue ("Issues 3/7"), the issue repository, Refresh, and Document | Table. If an issue's host isn't connected, the bar says so once, with Connect.

  • Under each linked task, one quiet line shows the issue's state, its title and the assignee, with a ⋯ menu: Open in browser, Refresh, Link another issue, Unlink. The state is one of:

    • Open or Closed;
    • for Jira, the status name (such as In Progress), with the Open or Closed icon picked by Jira's status category;
    • Closed (not planned) with a minus icon, for a GitHub issue closed as not planned (or as a duplicate), or a Jira issue that is Done with a resolution such as Won't Do.

    The #57 link stays in the task text.

  • A task without an issue has + Issue. You always see it on the first such task. On the others it appears when you point at the task or reach it with the keyboard.

  • Table lists every task in one row with its issue, state, assignee and actions, so you can see at a glance which tasks still need an issue. Kitsune remembers the view you chose.

Kitsune never ticks a task because its issue was closed, and never edits or closes an issue on its own. The controls aren't part of the task text, so when you select and copy tasks you get only their text.

Issues next to a change's tasks: the Issues bar, a line with Open or Closed and the assignee under each linked task, and + Issue on a task without one

The same tasks linked to the Jira project PAY: keys, Jira status names and assignees under the tasks

If an issue's host isn't connected or can't be reached, or the issue is gone, the task keeps the link and the line under it says why: "State not available offline", "Not connected" or "Issue not found".

Choose + Issue, type an issue number or words from the title to search open issues, and pick one. Kitsune writes the link at the end of the task line:

markdown
- [ ] 1.2 Restyle the selector [#57](https://github.com/acme/kumo/issues/57)

GitLab links look like [#9](https://gitlab.com/acme/web/kumo/-/issues/9), Jira links like [KUMO-12](https://acme.atlassian.net/browse/KUMO-12). In Jira you can search by key (KUMO-12), number (12) or words from the summary. A key from another project is refused. Kitsune also reads links you type yourself in that form. Links to pull requests or merge requests aren't issues, so Kitsune ignores them. Unlink removes the link from the line and leaves the issue alone.

Create an issue#

Create issue… under the search of + Issue opens a dialog with the task's title and text, plus a line that names the change or unit and the file. Edit them as you like. Nothing is sent until you choose Create. Kitsune opens the issue in the issue repository and writes its link into the task line. If the issue was created but the link couldn't be written, the dialog says so and offers Link it.

For a Jira project the dialog also asks for the Issue type. It loads the types from Jira when it opens, with Task first. When you choose a type, Kitsune reads the fields Jira requires for it and shows them under Required by Jira:

  • a list of allowed values: versions, components, priority or a select field (you can tick several where Jira allows it);
  • text, a number, a date or a date and time;
  • labels, separated by spaces;
  • a person, searched by name among the people who can be assigned in the project.

Create turns on once each field has a value. If a field is one Kitsune can't fill yet (a cascading select or a sprint, for example), the dialog names it before anything is created. Choose another type, or create the issue in Jira. If a value stopped being allowed while the dialog was open (say a version was archived meanwhile), nothing is created. The dialog reads the fields again, keeps your other values and asks you to check them.

Create issues for many tasks#

Create issues… in the Issues bar lists every open task in the file that has no issue yet, with its number and title. All of them are ticked. The button says how many issues it will create, for example Create 7 issues. On the Progress tab the same button lists the tasks of every active change or work unit, grouped by change, and each group has Choose all. One run creates at most 200 issues; if there are more, the first 200 are ticked.

For a Jira project you choose the issue type and its required fields once, and every issue in the run gets them. A person field can't be filled for a whole run, so if the type requires one, Create stays off. For that type, use Create issue… on each task.

Kitsune then creates the issues one by one. As soon as an issue exists, Kitsune writes its link into the task line, in the file as it is at that moment, so edits you make meanwhile are kept. The dialog shows progress such as 12 of 40 created. If an issue fails, the dialog lists it with the reason and the run goes on. Cancel stops after the current issue. If GitHub, GitLab or Jira asks Kitsune to slow down, the dialog shows Waiting for github.com (20 s) and then carries on. A wait longer than a minute stops the run.

Close done issues#

When a ticked task links to an issue that Kitsune last saw open, the Issues bar and the Progress tab offer Close done issues (n). The dialog lists those issues with their tasks, all ticked. It closes the ticked ones only when you choose Close.

  • GitHub issues are closed as completed. GitLab issues are closed.
  • In Jira, Kitsune uses the issue's only transition into a Done status. If there is none, or more than one, it leaves the issue open and says Close it in Jira.

A state checked more than a day ago is marked, with Refresh next to it. Kitsune never closes an issue whose task isn't ticked, and never reopens one.

In the issue repository popover (Change) you can turn on Close issues when a build is merged. It's off by default and the setting stays on this computer. When it's on, the result of Merge into my branch for a build or a build queue offers Close 6 done issues… for the tasks that build ticked, in the same dialog. With the setting off, nothing is closed.

Create issue, Create issues…, Close done issues and moving an issue to In Progress from a brief are part of Solo Pro and Team. Connecting, the state of linked issues, linking, Unlink, My issues and Start a change are free.

Start work from a Jira issue#

When a Jira host is connected, Home shows My issues under Assigned to you. These are your open Jira issues, at most 50, with key, summary, type, status, priority, sprint (or Backlog) and the Kitsune project.

By default the list comes from the Jira projects that the projects in this Home use as their issue repository. Change source lets you pick a Jira board or a JQL query instead. Kitsune always adds assigned to me and open and sorts the list itself, so it refuses a query with ORDER BY. The choice is kept for that Home on your computer. If you have more than 50 issues, Open in Jira opens the same search in your browser.

Start a change reads the issue and opens a change brief filled in from it, or a Bug fix for a Bug, saved in Drafts. You can switch between the two on Basics. Kitsune picks the project that uses the issue's Jira project. If several do, Basics asks which one. If none does, you pick a project and can tick Use KUMO as this project's issue repository. Nothing is written to the project until you choose Create.

The new proposal (or spec.md) gets a Source issue section with the link to the issue and the names of its attachments. Kitsune doesn't download the attachments. That link ties the change to the issue, so the row in My issues then offers Open change.

On Review you can tick Move KUMO-12 to In Progress in Jira. It's off by default. Kitsune sends that one transition only after Create has written the files. If Jira refuses it, for example because a field is required, the files stay and Kitsune shows Jira's reason with Try again and Open in Jira. This transition is the only thing Kitsune writes to Jira from a brief.

If you're offline, or a host doesn't answer or refuses the token, My issues shows the problem for that host with Try again. Issues from other hosts still show. Titles and descriptions stay in memory only. They're never written to disk except in the files you create.

Safe writes#

Kitsune changes only the task's line; every other byte of the file stays as it was. It writes only to a task file inside the project folder, never to a symbolic link pointing out of the folder or to a hardlink. It also writes only if the file hasn't changed since the section read it. If you edited the file in another editor in the meantime, Kitsune reads it again and asks you to try once more.

What leaves your computer#

Your token (or, after Sign in, the access and refresh token) is encrypted with your system's key store (Keychain, Windows DPAPI or the Secret Service on Linux) and kept only on this computer. Without a key store Kitsune doesn't save the token, and sign-in doesn't start. For Jira Cloud, the account email is stored encrypted with the token.

Signing in goes from your computer and browser straight to github.com or gitlab.com, never through Kitsune's servers. It sends only Kitsune's public app ID and the values of the sign-in itself.

Kitsune talks to GitHub, GitLab or Jira directly from your computer (for Jira Cloud also to Atlassian's API gateway for your site), never through Kitsune's servers. It refuses redirects, so your token can't be sent to another host. What it sends:

  • the repository and issue numbers it reads, and the search text you type;
  • on Create, the title, description and issue type from the dialog;
  • when you confirm Close done issues, one request per chosen issue to close it (for Jira, first a request for that issue's transitions);
  • when you open Create issue for a Jira project, a request for its issue types;
  • for My issues, the search for open issues assigned to you (with the Jira project keys, board or query of the source), a request for the list of fields and, in Change source, for the list of boards;
  • for Start a change, a read of that one issue and its transitions, and the one transition if you ticked the move.

The Sprint and Progress tabs ask the same hosts for the state of linked issues. Kitsune keeps only each issue's address, open / done / not planned and when it was checked, for 90 days. Opening any other document, or a task file without links, sends nothing. See the privacy policy.