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

refactor: Alias the alai function #1209

Merged
merged 3 commits into from
Aug 8, 2024
Merged

refactor: Alias the alai function #1209

merged 3 commits into from
Aug 8, 2024

Conversation

corinja
Copy link
Member

@corinja corinja commented Aug 1, 2024

The alai function works using the Lambda context object to parse the invoked function name. As an acronym for AWS Lambda Account ID it is not particularly memorable or descriptive. This PR aliases the function as getAccountIDFromContext to make it a little more understandable.

Tests pass.

corinja added 2 commits August 1, 2024 16:22
The `alai` function works using the Lambda context object to parse the invoked function name. As an acronym for AWS Lambda Account ID it is not particularly memorable or descriptive. This PR aliases the function as `getAccountIDFromARN` to make it a little more understandable.

Tests pass.
@corinja corinja requested a review from seb-cr August 1, 2024 15:36
@corinja corinja self-assigned this Aug 1, 2024
@seb-cr seb-cr changed the title fix: Alias the alai function refactor: Alias the alai function Aug 1, 2024
Copy link
Contributor

@seb-cr seb-cr left a comment

Choose a reason for hiding this comment

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

Thanks @corinja. Two things:

  • Having seen the code now, perhaps getAccountIDFromContext would be more accurate? I had forgotten alai takes the whole context object, not just the ARN!

  • I've renamed the PR to refactor since this does not introduce any observable changes to Lambda Wrapper's API

@corinja corinja requested a review from seb-cr August 8, 2024 13:51
@corinja corinja merged commit 0721d9e into master Aug 8, 2024
5 checks passed
@corinja corinja deleted the fix-alias-alai branch August 8, 2024 14:08
Copy link

🎉 This PR is included in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants