This Bash script helps you create a Pivotal Tracker story using the Pivotal Tracker API. The script prompts you for various inputs, sends an HTTP request to create the story, and provides feedback based on the HTTP response code.
Before using this script, make sure you have the following:
- Pivotal Tracker API token: You need to export your Pivotal Tracker API token as an environment variable named
TOKEN
. You can obtain your API token from your Pivotal Tracker account settings. Find you token here: https://www.pivotaltracker.com/profile - Tracker Project Id. You can find it on you board URL
-
Save the script to a file (e.g.,
create_pivotal_story.sh
) and make it executable withchmod +x create_pivotal_story.sh
. -
Execute the script:
./create_pivotal_story.sh
-
Follow the prompts to provide the necessary information:
-
Project ID: Enter your Pivotal Tracker project ID. If the
PROJECT_ID
environment variable is already set, you won't be prompted. -
Story Name: Enter a name for the story.
-
Story Description: Enter a description for the story.
-
Story Type: Select a story type from the available options: "feature," "bug," or "chore."
-
Story Priority: Select a story priority from the available options: "p1," "p2," or "p3."
-
-
The script will send an HTTP request to create the story, and based on the response, it will provide feedback.
-
If the HTTP response code is in the 200 range, it will display a success message along with the story ID and URL.
-
If the HTTP response code is not in the 200 range, it will display an error message.
-
-
The script uses
jq
to parse JSON responses. Make sure you havejq
installed for it to work correctly. -
The script can be further extended and customized to suit your specific needs.
https://chat.openai.com/share/43068178-5cb8-4f63-aacb-310fa4365460