Skip to content

Conversation

@tsudhakar87
Copy link
Contributor

@tsudhakar87 tsudhakar87 commented Jan 30, 2026

ℹ️ Issue

Closes #94

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

  1. Added a generate-readme command to the lambda CLI tool with a general template displaying setup, endpoint, and test information
  2. Added a Github workflow job that regenerates READMEs if there are any changes found (mainly to the handler of lambda)
  3. Generated READMEs for all current lambdas

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Tested by using CLI to make a test-lambda, which generated this README
Screenshot 2026-01-29 at 6 05 34 PM

(this was before the workflow was changed to trigger on workflow_run instead of pull_request) You can also see it in action in this PR! After I updated this branch from main, the GitHub actions bot generated a readme for the new auth lambda.

Screenshot 2026-02-05 at 11 45 28 AM

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

routes = [{ method: 'GET', path: '/health', description: 'Health check' }];
}

const description = options.description || `TODO: Add a description of the ${handlerName} lambda.`;
Copy link
Contributor Author

@tsudhakar87 tsudhakar87 Feb 5, 2026

Choose a reason for hiding this comment

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

When a new lambda is generated, it will be on the developer of that PR to update the description (if it's regenerating for an old lambda the description won't change). Is this fine or do we want to use another template description to reduce the number of potentially forgotten todo's (like "Lambda for ${handlerName}")

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question, I think its ok to leave the TODO, hopefully either the dev or one of the reviewers will catch it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, this is great!

@tsudhakar87 tsudhakar87 marked this pull request as ready for review February 5, 2026 17:27
denniwang
denniwang previously approved these changes Feb 5, 2026
Copy link
Contributor

@denniwang denniwang left a comment

Choose a reason for hiding this comment

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

LGTM, looks like we need to write a lot more documentation though...

routes = [{ method: 'GET', path: '/health', description: 'Health check' }];
}

const description = options.description || `TODO: Add a description of the ${handlerName} lambda.`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Good question, I think its ok to leave the TODO, hopefully either the dev or one of the reviewers will catch it.

Copy link
Collaborator

@nourshoreibah nourshoreibah left a comment

Choose a reason for hiding this comment

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

One small change but otherwise LGTM!

echo "No README changes to commit"
else
git commit -m "chore: regenerate lambda READMEs"
git push
Copy link
Collaborator

Choose a reason for hiding this comment

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

One small comment here: Since this workflow pushes a commit, we need to make sure we don't get race conditions with any other pipelines that also push commits (the terraform readme one in our case), otherwise they could error if running at same time. Can you either make this pipeline wait for the tf one or the tf one wait for this? Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooo good catch ty I will make this one wait for the tf one!

Copy link
Collaborator

@nourshoreibah nourshoreibah left a comment

Choose a reason for hiding this comment

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

Thank you for the changes! Great Work!

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.

Add README Generation to Lambda CLI

3 participants