Skip to content

Conversation

@locus313
Copy link
Owner

No description provided.

@locus313 locus313 requested a review from Copilot June 23, 2025 05:21

This comment was marked as outdated.

@locus313 locus313 requested a review from Copilot June 23, 2025 05:24

This comment was marked as outdated.

@locus313 locus313 requested a review from Copilot June 23, 2025 05:27

This comment was marked as outdated.

@locus313 locus313 requested a review from Copilot June 23, 2025 05:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.conf for USER_KEYS definitions
  • Update sync-ssh-keys.sh to source users.conf and set SCRIPT_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: 0 to 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.conf is 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 the USER_KEYS entries, 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

@locus313 locus313 merged commit aca6029 into main Jun 23, 2025
1 check passed
@locus313 locus313 deleted the config branch June 23, 2025 05:33
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