-
Notifications
You must be signed in to change notification settings - Fork 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
Add a shortcut integration #32
base: main
Are you sure you want to change the base?
Add a shortcut integration #32
Conversation
4594511
to
d64de60
Compare
@@ -0,0 +1 @@ | |||
gpt-updater:description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this related to shortcut, do you mind to create a new PR for that?
const placeholder = "gpt-updater:description" | ||
const placeholderFinished = "<!-- gpt-updater:description -->" | ||
|
||
type Info struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure doesn't look flexible and, in my opinion, needs improvement. What do you think about keeping the old flat logic without an extra structure and simply validating that only JIRA or shortcut are allowed? If both are passed, then return an error.
Summary
The development work done was primarily focused on integrating a new shortcut feature into the existing codebase. This involved creating new functions, updating existing ones, and writing tests to ensure the functionality works as expected. The changes were made across six files, including the addition of a new file.
Changes
.github/pull_request_template.md
README.md
description
command to include a new--shortcut-url
option.cmd/description/main.go
description/description.go
Info
.BuildUpdatedPullRequest
function to construct a new pull request description based on the providedInfo
struct.IsDescriptionFinished
andneedToUpdateByPlaceholder
functions to check if a pull request description contains certain placeholders.strings
package.shortcut/shortcut.go
shortcut/shortcut_test.go
Impact
These changes will allow users to generate Shortcut links more efficiently and customize their pull request descriptions. The new tests ensure that the new functions work as expected, increasing the reliability of the code. The changes also improve the readability and maintainability of the code by introducing a new structure and modifying the way information is generated and stored.