Skip to content

scaffolding: add templates and functionality for backend scaffolding #3263

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 3 commits into
base: main
Choose a base branch
from

Conversation

raulmyocu
Copy link

@raulmyocu raulmyocu commented Mar 25, 2025

Description

  • Adds a new scaffold functionality for backend components:
    • Creates service and service test templates
    • Creates module and module test templates
      • Creates an associated service if needed
      • Creates api .proto file with a sample api
    • Adds new components into backend/main.go
  • Refactors existing workflows in order to keep an internal state from prompting values -> post processing

Testing Performed

Manual testing

  • make scaffold-service
  • make scaffold-api

GitHub Issue

TODOs

@raulmyocu raulmyocu requested a review from a team as a code owner March 25, 2025 20:30
Copy link

github-actions bot commented Apr 1, 2025

This PR has been marked as stale after 7 or more days of inactivity. Please have a maintainer add the on hold label if this PR should remain open. If there is no further activity or the on hold label is not added, this PR will be closed in 3 days.

@github-actions github-actions bot added the stale Issue hasn't had activity in awhile label Apr 1, 2025
@jecr jecr removed the stale Issue hasn't had activity in awhile label Apr 1, 2025
@raulmyocu raulmyocu changed the title scaffolding: add templates and functionality for service scaffolding scaffolding: add templates and functionality for backend scaffolding Apr 1, 2025
Copy link

github-actions bot commented Apr 9, 2025

This PR has been marked as stale after 7 or more days of inactivity. Please have a maintainer add the on hold label if this PR should remain open. If there is no further activity or the on hold label is not added, this PR will be closed in 3 days.

@github-actions github-actions bot added the stale Issue hasn't had activity in awhile label Apr 9, 2025
@jecr jecr requested a review from Copilot April 10, 2025 16:34
@jecr jecr removed the stale Issue hasn't had activity in awhile label Apr 10, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • Makefile: Language not supported

}
break
} else if strings.Contains(line, "gateway.Run(") {
*lines = slices.Insert(*lines, i, registrationLine, "")
Copy link
Preview

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

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

The slices.Insert function is called with an extra argument; the standard library version expects only one element to insert. Consider removing the extra "" argument so that the function call matches the expected signature.

Suggested change
*lines = slices.Insert(*lines, i, registrationLine, "")
*lines = slices.Insert(*lines, i, registrationLine)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Comment on lines +39 to +40
if r == nil || len(matches) != 4 {
log.Fatal(fmt.Errorf("unable to determine git upstream from %s", urlStr))
Copy link
Preview

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

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

The check is using 'r == nil' instead of verifying if 'matches' is nil. Update the condition to 'if matches == nil || len(matches) != 4' to correctly validate the regex output.

Suggested change
if r == nil || len(matches) != 4 {
log.Fatal(fmt.Errorf("unable to determine git upstream from %s", urlStr))
if matches == nil || len(matches) != 4 {

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

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.

2 participants