Skip to content

Feature/get secrets - #286

Merged
russell-stern merged 7 commits into
mainfrom
feature/get-secrets
Jul 31, 2026
Merged

Feature/get secrets#286
russell-stern merged 7 commits into
mainfrom
feature/get-secrets

Conversation

@russell-stern

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

Copy link
Copy Markdown

👋 russell-stern, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

characterId: string,
): StarWarsCharacter => {
const url = config.url.replace('{characterId}', characterId)
url = config.url.replace('{characterId}', characterId)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the intention here was to use url passed in? Right now we are still using URL from config.

Additionally not sure why linter is not picking this but we would like to avoid overriding function params. So the way to this imo would be something like:

const fetchStarWarsCharacter = (
	sendRequester: HTTPSendRequester,
	config: Config,
	_url: string,
	characterId: string,
): StarWarsCharacter => {
	const url = _url.replace('{characterId}', characterId)
    // ....... 

characterIds = runtime
.getSecrets(secretsToFetch)
.result()
.map((response: any) => response.response.value.value)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The ergonomics seems slightly off here. When you look at regular getSecret when you call .result() on it you just get the value right away. Here user needs to map it himself via accessing response.response.value.value I wonder if we could have getSecrets() return just array of secrets by default?

@russell-stern
russell-stern merged commit 662b5fb into main Jul 31, 2026
15 checks passed
@russell-stern
russell-stern deleted the feature/get-secrets branch July 31, 2026 16:22
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.

4 participants