Skip to content

Add a shortcut integration [sc-25996] #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

vanilevsky
Copy link
Owner

@vanilevsky vanilevsky commented Jul 9, 2023

Summary

The development work was primarily focused on integrating a new feature that allows users to extract and display Shortcut story IDs from GitHub pull requests or branch names. This was achieved by introducing new functions in the 'shortcut' package, updating the 'opts' struct, and updating the documentation.

Changes

  • README.md
    • Added a new option, --shortcut-url, in the description of the description command.
  • cmd/description/main.go
    • Added functionality to extract and display Shortcut story IDs from GitHub pull request title or branch name.
    • Added functionality to generate a link to the corresponding Shortcut story if a Shortcut base URL is provided.
    • Updated the 'opts' struct to include a new field for the Shortcut base URL.
    • Rearranged import statements and added a new import for the 'shortcut' package.
  • shortcut/shortcut.go
    • Introduced a new function, 'ExtractShortcutStoryId', to extract a Shortcut story ID from a string using a regular expression.
    • Introduced another new function, 'GenerateShortcutStoryUrl', to generate a Shortcut story URL using a base URL and a ticket ID.
  • shortcut/shortcut_test.go
    • Introduced two new test functions, 'TestExtractShortcutStoryID' and 'TestGenerateShortcutStoryURL', to test the new functions in the 'shortcut' package.

Impact

The changes will enhance the tool's functionality by allowing users to generate Shortcut links in the description, extract and display Shortcut story IDs, and generate a Shortcut story URL using a base URL and a ticket ID. This will improve the tool's usability and efficiency.

@vanilevsky vanilevsky force-pushed the feature/sc-25996/use-gpt-0 branch from 4594511 to d64de60 Compare July 10, 2023 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant