Add automatic gh auth login prompt when sharing benchmark results #689
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds an automatic authentication prompt to LinearSolveAutotune's
share_results()
function, making it much easier for users to share their benchmark results with the community. When users try to share results without being authenticated, the function now offers to rungh auth login
interactively, using either the system gh CLI or the JLL-provided version.Key Feature: gh_cli_jll Integration
The implementation uses
gh_cli_jll
to ensure the auto-authentication feature works on all systems:Changes
Core Implementation
gh_cli_jll
as a dependency to LinearSolveAutotuneget_gh_command()
helper that intelligently selects between system gh and JLL ghsetup_github_authentication()
to accept anauto_login
parameterAuthentication Flow
When
auto_login=true
and no authentication is found, the function:gh auth login
interactively (using system gh or JLL)Fallback Behavior
User Experience
Before (current behavior):
After (with this PR):
Implementation Details
gh Command Selection
Unified CLI Operations
All gh operations now use the same wrapper:
setup_github_authentication()
- auth status checksupload_plots_to_gist_gh()
- creating gistscomment_on_issue_gh()
- posting commentscreate_benchmark_issue_gh()
- creating issuesFeatures
share_results(results; auto_login=false)
Testing
Tested the following scenarios:
Benefits
Documentation
Updated the docstring for
share_results()
to document:auto_login
parameterThis change significantly improves the user experience for contributing benchmark results to the LinearSolve.jl community by removing all manual setup requirements.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]