Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extracts the user-to-key mapping out of the main script into its own configuration file, adds version metadata to sync-ssh-keys.sh, and updates documentation and CI workflows to support automated tagging and release.
- Introduce a standalone
users.confforUSER_KEYSdefinitions - Update
sync-ssh-keys.shto sourceusers.confand setSCRIPT_VERSION - Revise README and add GitHub Actions workflows for version checks and releases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| users.conf | New file defining USER_KEYS associative array for user SSH key URLs |
| sync-ssh-keys.sh | Removed inline config, added loading of users.conf, and bumped SCRIPT_VERSION |
| README.md | Updated configuration instructions to reference users.conf and added execution step |
| .github/workflows/release.yml | New workflow to extract SCRIPT_VERSION, tag, and publish a release |
| .github/workflows/check-version.yml | New PR check to ensure SCRIPT_VERSION is bumped before merging |
Comments suppressed due to low confidence (4)
.github/workflows/release.yml:12
- Add
fetch-depth: 0to the checkout step to ensure that all tags are fetched and available when creating or verifying tags.
- name: Checkout code
sync-ssh-keys.sh:6
- There are no tests covering the new configuration loading logic (missing file, syntax error). Consider adding unit or integration tests to verify behavior when
users.confis absent or invalid.
# === Load user configuration ===
users.conf:1
- [nitpick] It would be helpful to add a header comment explaining the purpose of
users.conf, the expected format for theUSER_KEYSentries, and allowed methods.
declare -A USER_KEYS=(
sync-ssh-keys.sh:12
- Sourcing the entire users.conf file can execute arbitrary code if the file is compromised. Consider validating its contents or using a safer parsing approach (e.g., reading line-by-line).
if ! source "$SCRIPT_DIR/users.conf"; then
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.