Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: expose support links as env variables#11697

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 4 commits intomainfrom11628-fix-1
Jan 19, 2024
Merged

feat: expose support links as env variables#11697

mtojek merged 4 commits intomainfrom11628-fix-1
Jan 19, 2024

Conversation

mtojek
Copy link
Member

Fixes:#11628

This PR is a workaround to enable support links to be passed as env variables. This is an alternative solution to the proposed concept with enumerated vars (..._0_NAME,..._1_NAME), which might be tricky to implement - discover the number of vars, guess the config schema, etc. JSON object seems to be more flexible format for such cases.

export CODER_SUPPORT_LINKS='[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]'

or

export CODER_SUPPORT_LINKS=$(cat<<EOF[{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"}, {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"}, {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg"}, {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]EOF)

or indeployment.yaml

env:        -name:CODER_SUPPORT_LINKSvalue:>            [{"name": "Hello GitHub", "target": "https://github.com/coder/coder", "icon": "bug"},             {"name": "Hello Slack", "target": "https://codercom.slack.com/archives/C014JH42DBJ", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/slack.svg"},             {"name": "Hello Discord", "target": "https://discord.gg/coder", "icon": "https://raw.githubusercontent.com/coder/coder/main/site/static/icon/discord.svg"},             {"name": "Hello Foobar", "target": "https://discord.gg/coder", "icon": "/emojis/1f3e1.png"}]

@mtojekmtojek self-assigned thisJan 19, 2024
@mtojekmtojek marked this pull request as ready for reviewJanuary 19, 2024 09:33
Copy link
Member

@matifalimatifali left a comment

Choose a reason for hiding this comment

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

Great. I think it's a good enough workaround. What do you tink@ammario?

@mtojek
Copy link
MemberAuthor

I don't mind supporting both options. There could be users who prefer JSON over enumerated format (_0_NAME,_1_NAME,...). I will merge this change, and we can iterate on the other option later.

@mtojekmtojek merged commit89fd294 intomainJan 19, 2024
@mtojekmtojek deleted the 11628-fix-1 branchJanuary 19, 2024 10:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 19, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@matifalimatifalimatifali approved these changes

@ericpaulsenericpaulsenAwaiting requested review from ericpaulsen

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support settingsupportLinks as env variables

2 participants

@mtojek@matifali

[8]ページ先頭

©2009-2025 Movatter.jp