Skip to content

fix: unset GITHUB_TOKEN if empty for ubi + plugins#3114

Merged
jdx merged 2 commits into
mainfrom
token-var
Nov 21, 2024
Merged

fix: unset GITHUB_TOKEN if empty for ubi + plugins#3114
jdx merged 2 commits into
mainfrom
token-var

Conversation

@jdx

@jdx jdx commented Nov 21, 2024

Copy link
Copy Markdown
Owner
                   Fixes #3070

@codacy-production

Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% 66.67%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ede21fb) 21496 16920 78.71%
Head commit (05bb99c) 21506 (+10) 16926 (+6) 78.70% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3114) 12 8 66.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@github-actions

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-main x -- echo 15.3 ± 0.6 14.3 20.0 1.03 ± 0.05
mise-2024.11.20 x -- echo 14.8 ± 0.4 14.1 17.8 1.00
mise x -- echo 15.1 ± 0.4 14.3 16.6 1.02 ± 0.04

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-main env 12.1 ± 0.6 11.3 21.3 1.03 ± 0.10
mise-2024.11.20 env 11.8 ± 0.9 11.0 31.0 1.00
mise env 12.0 ± 0.3 11.3 13.4 1.02 ± 0.08

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-main hook-env 11.9 ± 0.3 11.3 13.1 1.02 ± 0.04
mise-2024.11.20 hook-env 11.7 ± 0.4 10.9 13.0 1.00
mise hook-env 12.0 ± 0.5 11.2 13.7 1.03 ± 0.05

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-main ls 12.4 ± 0.4 11.5 14.6 1.04 ± 0.04
mise-2024.11.20 ls 11.9 ± 0.3 11.3 13.0 1.00
mise ls 12.2 ± 0.2 11.7 13.2 1.03 ± 0.03

@jdx jdx merged commit 0b57636 into main Nov 21, 2024
@jdx jdx deleted the token-var branch November 21, 2024 12:56
jdx pushed a commit that referenced this pull request Jul 9, 2025
Fixes https://github.com/jdx/mise/issues/5524.

#3114 introduced the overwrite behaviour
to resolve https://github.com/jdx/mise/issues/2910 and
https://github.com/jdx/mise/issues/3070.
It was to ignore an invalid `GITHUB_TOKEN` if `MISE_GITHUB_TOKEN` is set
to an empty string, but it was necessary only because we used to call
`ubi` from the CLI.

For asdf plugins, this should be enough to overwrite `GITHUB_TOKEN`.

https://github.com/jdx/mise/blob/ce78f04bfb338d218df90301a093b01b1d67d13a/src/plugins/asdf_plugin.rs#L426

I'm not sure about vfox plugins, but I don't think this PR will change
any behaviours because it seems `vfox.rs` not using the tokens.
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.

1 participant