-
Notifications
You must be signed in to change notification settings - Fork 0
Get Jira Issues action and Update PR description action #1
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
base: master
Are you sure you want to change the base?
Conversation
klismannsm
left a comment
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.
Two general issues to address:
-
node_modules was not ignored. Did you add them to speed up the CI process?
-
The code is using semi-colons at the end of lines in almost every line, but some lines are not. We should choose one style and stick with it, possibly adding a prettier config file to handle this.
lib/update-pr-description.js
Outdated
| const matchRegex = new RegExp(matchRegexString, 'g'); | ||
| let newDescription | ||
| console.log("Checking for matching content using regex:", matchRegex) | ||
| if (matchRegexString === undefined || !matchRegex.test(currentDescription)) { | ||
| console.log("No matching content found, adding new contents to the end") | ||
| newDescription = `${currentDescription}\n\n${newContents}`; | ||
| } else { | ||
| console.log("Matching content found, replacing it with new contents") | ||
| newDescription = currentDescription.replace(matchRegex, newContents); | ||
| } |
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.
(improvement): This can be extracted into a separated method to improve readability.
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.
Done
I will address other code comments in line with GitHub reviews |
Adds two new GitHub actions
get-jira-issues: obtains a list of Jira issues for the specified projects from the commit messagesupdate-pr-description: updates a specified set of content in the PR description for easy updates of content such as the list of jira issues on a release PR