Skip to content

jira doc #7

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

Merged
merged 1 commit into from
May 5, 2023
Merged

jira doc #7

merged 1 commit into from
May 5, 2023

Conversation

ravilushqa
Copy link
Owner

@ravilushqa ravilushqa commented May 5, 2023

Added support for generating Jira links in the pull request description using the --jira-url option in the description command. Jira links are generated with the format [[Jira Ticket|Jira URL/Jira Ticket]]. Example usage: pr-helper description --jira-url https://jira.atlassian.com.

@@ -65,7 +65,7 @@ Replace `<GITHUB_TOKEN>`, `<OPENAI_TOKEN>`, `<OWNER>`, `<REPO>`, and `<PR_NUMBER
### Description Command

The usage for the `description` command is similar to the `review` command. Replace `review` with `description` in the command above and execute.

Only difference is that `description` command has extra option `--jira-url` which is used to generate Jira links in the description.

## GitHub Action

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a quick review, the patch seems to be adding an extra option to the existing command description. The new option (--jira-url) seems to be used to generate Jira links in the description.

Since the patch adds only one extra option, it seems to be adding a low risk of potential bugs. However, thorough testing should still be done, especially since the new option might add some complexity to the existing code.

As for improvement suggestions, it would be helpful to have some more context on the project and its requirements to give more specific suggestions. However, in general, it's always good to make sure the code is well-documented and well-organized, follows good coding practices (e.g. is modular, readable, and maintainable), and is properly tested. Additionally, optimizing performance and minimizing external dependencies can also be helpful.

@@ -23,7 +23,7 @@ var opts struct {
Repo string `long:"repo" env:"REPO" description:"GitHub repo" required:"true"`
PRNumber int `long:"pr-number" env:"PR_NUMBER" description:"Pull request number" required:"true"`
Test bool `long:"test" env:"TEST" description:"Test mode"`
JiraURL string `long:"jira-url" env:"JIRA_URL" description:"Jira URL"`
JiraURL string `long:"jira-url" env:"JIRA_URL" description:"Jira URL. Example: https://jira.atlassian.com"`
}

func main() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code patch adds a new command-line argument 'JiraURL', which takes a string value representing the Jira URL. The argument is optional, but if provided, it should be a valid URL.

There don't appear to be any bug risks associated with this change. However, there are a few suggestions for improvement:

  1. The 'JiraURL' argument could benefit from additional validation to ensure that it is a valid URL. This could be done using a regular expression or a third-party library like "urlparse" in Python.
  2. The description for the 'JiraURL' argument should be more specific about what the URL is for and what format it should be in.
  3. It might be helpful to provide some additional context on why this new argument was added and how it will be used.

@ravilushqa ravilushqa merged commit 219cc7f into main May 5, 2023
@ravilushqa ravilushqa deleted the document_jira_attribute branch May 7, 2023 08:30
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