Skip to content

Avoid hardcoded secrets name when checking OpenAI API Key #195

@stefanusgusega

Description

@stefanusgusega

Summary

I noticed that this tool assumed that OpenAI API Key is always stored in OPENAI_API_KEY secrets variable (https://github.com/anc95/ChatGPT-CodeReview/blob/dev/src/bot.ts#L21). I want to make this key can be stored with using flexible secrets variable name. This is recommended because the tool also initiated Chat object with OpenAI API Key fetched from environment variables, instead of directly to secrets variable (https://github.com/anc95/ChatGPT-CodeReview/blob/dev/src/bot.ts#L10).

This improvement should be good, because somehow the bot commented on the pull request indicating that I did not set OPENAI_API_KEY secrets variable (indeed I did not set it up, instead I set up the other variable). The PR can be seen on this link: stefanusgusega/sepotifai-retriever#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions