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

feat: implement set and show global key #34

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

CorrectRoadH
Copy link
Member

@CorrectRoadH CorrectRoadH commented Jul 5, 2023

set a value

go run . app-management set global OPENAPI_AI_KEY sk-test-value

to look all global value

go run . app-management show global

Note: The PR is wait IceWhaleTech/CasaOS-AppManagement#110 to be merged. So the Open API file may didn't update and the program can't be compiled. So the QA can use the file below.

@CorrectRoadH
Copy link
Member Author

casaos-cli.zip
The binary file for test

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@CorrectRoadH CorrectRoadH marked this pull request as ready for review July 6, 2023 06:40
tigerinus added a commit to IceWhaleTech/CasaOS-AppManagement that referenced this pull request Jul 7, 2023
# What does the PR do?
It imports a new config and adds an env var(`OPENAI_API_KEY`) to every
v2 app.

# Test Steps
1. change the config(`/etc/casaos/app-management.conf`)
2. new an app
3. type `env` in app terminal like

![image](https://github.com/IceWhaleTech/CasaOS-AppManagement/assets/29306285/a68e3053-d6bf-4fb7-bc12-bb5f7b4a65e0)

4. use `go run . app-management set global OPENAPI_AI_KEY sk-test-value`
in IceWhaleTech/CasaOS-CLI#34


5. type `env` in app terminal like. to see `OPENAI_API_KEY` be changed.

---------

Signed-off-by: Tiger Wang <[email protected]>
Co-authored-by: Tiger Wang <[email protected]>
@tigerinus tigerinus merged commit fed556f into IceWhaleTech:main Jul 7, 2023
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