A local client for connecting and working with the shortcut app
Project description
Shipyard-Shortcut
Description
A Python package that provides a simple way to interact with the Shortcut app, allowing you to create, update, and add comments to tickets and tasks directly from the command-line interface (CLI).
Installation
pip3 install shipyard-shortcut
Usage
from shipyard_shortcut import shipyard_shortcut
shortcut = shipyard_shortcut(<access_token>)
shortcut.create_ticket(<project_id>, <ticket_type>, <title>, <description>, <workflow_state_id>)
Command-Line Arguments
Add Comment
- --access-token: (required) The access token for authenticating with the Shipyard Shortcut API.
- --story-id: (required) The ID of the story to which the comment should be added.
- --comment: (required) The content of the comment to be added.
- --verbose: (optional) Enable verbose mode for detailed logging. If not provided, the default is false.
Create Ticket
- --access-token: (required) The access token for authenticating with the Shipyard Shortcut API.
- --story-name: (required) The name/title of the story to be created.
- --workflow-state-id: (required) The ID of the workflow state to assign to the story.
- --description: (optional) The description/content of the story. If not provided, it will be empty.
- --story-type: (required) The type of the story. Possible values are 'feature', 'bug', or 'chore'.
- --labels: (optional) Comma-separated labels to assign to the story. If not provided, it will have no labels.
- --deadline: (optional) The deadline for the story. If not provided, there will be no deadline set.
- --tasks: (optional) Comma-separated tasks to add to the story. If not provided, the story will have no tasks.
- Note: If --labels or --tasks are provided, they should be comma-separated values.
Edit Ticket
- --access-token: (required) The access token for authenticating with the Shipyard Shortcut API.
- --story-id: (required) The ID of the story to be edited.
- --story-name: (optional) The new name/title of the story.
- --workflow-state-id: (optional) The new ID of the workflow state to assign to the story.
- --description: (optional) The new description/content of the story.
- --story-type: (optional) The new type of the story. Possible values are 'feature', 'bug', or 'chore'.
- --labels: (optional) Comma-separated labels to assign to the story.
- --deadline: (optional) The new deadline for the story.
- --tasks: (optional) Comma-separated tasks to add to the story.
- Note: If --labels or --tasks are provided, they should be comma-separated values.
Authentication
Step 1: Go to https://app.shortcut.com/<workspace_name>/settings/account/api-tokens to generate an API token. Step 2: Give the token a memorable name and click "Generate Token".
Finding the Workflow State ID in Shortcut:
-
Navigate to the Shortcut Board: Go to the Shortcut board where you want to find the workflow state ID.
-
Locate the Workflow State: Identify the specific workflow state you are interested in.
-
Access Workflow State Options: Click on the ellipsis (...) button associated with the workflow state.
-
Select "View State": From the dropdown menu that appears, choose "View state."
-
Open the Search Page: A search page will open, displaying the details of the workflow state.
-
Find the Workflow State ID: Locate the search bar on the search page.
-
Note the Workflow State ID: The value in the search bar represents the workflow state ID you are looking for.
-
Alternative: Check the URL: Additionally, you can find the workflow state ID at the end of the URL in your browser's address bar.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for shipyard_shortcut-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85580cbce27da2179e3b47b6747e42aa099264094931a577ee67993f4fec63e0 |
|
MD5 | 11187e6ec3aa95e0bb2c7a2d6c0f6096 |
|
BLAKE2b-256 | 17657a9851ff5b3e71c2483b97c42b9a0c35e3b39e18f2ac00db4d7128598578 |