Skip to content
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

Docs: Update create_git_branch.ts #1365 #1379

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

akamini
Copy link

@akamini akamini commented Sep 7, 2023

closes #1365

For the Submitter

Tasks

  • Make sure "closes (issue number)" is written close to the top
  • Attach the enhancement label for update tasks
  • Make sure CI completes successfully
  • Add reviewers
  • On Slack, mention the PR reviewer, write your thoughts on the issue, and inform them that the PR has been created

For the Reviewer

Before Reviewing

  • Write which PR you are reviewing on Slack

Checks

  • Each task for the related issue are written and in checkboxes
  • The branch name is close to the issue name
  • CI completes successfully
  • Changes include only what is necessary for this PR
  • Necessary unit tests are implemented
  • Necessary E2E tests are implemented
  • Perform functionality checks
  • If there are any problems, request revisions from the PR submitter and mention them on Slack

After Reviewing

  • Leave an approval comment (e.g. LGTM)
  • On Slack, mention the PR submitter and a project admin, write which PR you have reviewed, and ask them to merge the PR

@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codeclimate
Copy link

codeclimate bot commented Sep 7, 2023

Code Climate has analyzed commit cf5bad6 and detected 0 issues on this pull request.

View more on Code Climate.

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Update Summary

The file revised is create_git_branch.ts located under the directory src/lib/git.

create_git_branch.ts file

  • The code for capturing parts of issued name and number was updated using RegExp.exec method, which was previously done through string.match method. This might have been done to provide a more reliable and robust way to capture those parts.
  • The original issue name now undergoes an additional replacement process that changes all slash and underscore characters to hyphen before the existing replacement operation that removes other non-alphanumeric characters.
  • An extra line of code was added that directs console to print out the generated branch name. However, this line of code is commented out, possibly for future debugging purposes.

Suggestions for Improvement

create_git_branch.ts file

  • It is a good practice to avoid commenting out pieces of code that might be used for debugging purposes. If needed, consider using conditional log statements that can be turned on or off depending on the environment.
  • Consider providing detailed comments on the changes made, especially on why slashes and underscores are being replaced with hyphens in the issue names. This would greatly improve code readability and maintainability.
  • It is also a good idea to encapsulate the error messages inside functions which makes the error handling more modular and reusable across different parts of your codebase.

@akamini akamini added the enhancement New feature or request label Sep 7, 2023
@akamini akamini requested a review from iamsin September 7, 2023 14:33
@gottu91-code gottu91-code self-requested a review September 8, 2023 04:43
Copy link
Collaborator

@gottu91-code gottu91-code left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sinproject-iwasaki sinproject-iwasaki left a comment

Choose a reason for hiding this comment

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

  • Issue で要求されているように、sinpro-dev のコードをコピーして利用しましたでしょうか?Diffをすると差異があるように見えるので、再確認いただけますでしょうか?

@sinproject-iwasaki
Copy link
Contributor

  • Issue で要求されているように、sinpro-dev のコードをコピーして利用しましたでしょうか?Diffをすると差異があるように見えるので、再確認いただけますでしょうか?

確認ミスでした。問題ございませんでした。

@sinproject-iwasaki sinproject-iwasaki merged commit d0f6543 into main Sep 8, 2023
7 checks passed
@sinproject-iwasaki sinproject-iwasaki deleted the 1365-update-create_git_branch.ts branch September 8, 2023 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update create_git_branch.ts
3 participants