[PR #29] [WIP] Conflict resolution - Add change history for ssh keys #32

Open
opened 2026-02-28 01:18:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/therealpaulgg/ssh-sync-server/pull/29
Author: @Copilot
Created: 5/22/2025
Status: 🔄 Open

Base: mainHead: copilot/fix-21


📝 Commits (7)

  • 6c541b7 Initial plan for issue
  • b3861c1 Initial plan for implementing SSH key change history
  • 705b249 Implement SSH key change history tracking
  • 769647d Update setup to register SshKeyChangeRepository and add documentation
  • fa17445 Add instructions for updating ssh-sync-db repository
  • 5f07f76 Fix test infrastructure for SSH key change history implementation
  • f8c56b9 Implement comprehensive tests for SSH key change history

📊 Changes

18 files changed (+1333 additions, -14 deletions)

View changed files

docs/db_repository_update.md (+49 -0)
docs/sql/ssh_key_changes.sql (+25 -0)
docs/ssh_key_change_history.md (+36 -0)
📝 go.mod (+2 -1)
📝 internal/setup/main.go (+11 -1)
pkg/database/models/ssh_key_change.go (+31 -0)
pkg/database/query/transaction_mock.go (+36 -0)
pkg/database/repository/machine_test.go (+0 -3)
pkg/database/repository/ssh_config_test.go (+0 -3)
📝 pkg/database/repository/ssh_key.go (+169 -0)
pkg/database/repository/ssh_key_change.go (+112 -0)
pkg/database/repository/ssh_key_change_mock.go (+68 -0)
pkg/database/repository/ssh_key_change_test.go (+301 -0)
📝 pkg/database/repository/ssh_key_test.go (+436 -1)
📝 pkg/database/repository/user.go (+29 -1)
pkg/database/repository/user_test.go (+0 -3)
📝 test/pgx/mock.go (+1 -1)
test/pgx/mock_database.go (+27 -0)

📄 Description

  • Create a new SshKeyChange model to track changes to SSH keys
  • Add SshKeyChangeRepository interface and implementation
  • Modify SshKeyRepository to record changes when keys are created, updated, or deleted
  • Update SshKeyRepo to implement the new methods
  • Update the UserRepo.DeleteUserKeyTx method to record key deletions
  • Create tests for the new functionality
  • Update existing tests to account for the new change tracking

Fixes #21.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/therealpaulgg/ssh-sync-server/pull/29 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 5/22/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `copilot/fix-21` --- ### 📝 Commits (7) - [`6c541b7`](https://github.com/therealpaulgg/ssh-sync-server/commit/6c541b7f3d832a2ed3f8c5794984166d99fa449f) Initial plan for issue - [`b3861c1`](https://github.com/therealpaulgg/ssh-sync-server/commit/b3861c141c175c0660b6efe99d1228324bf85e9e) Initial plan for implementing SSH key change history - [`705b249`](https://github.com/therealpaulgg/ssh-sync-server/commit/705b249bc528303d1a4c8b0f38827e0ff25e3dd7) Implement SSH key change history tracking - [`769647d`](https://github.com/therealpaulgg/ssh-sync-server/commit/769647dea340d8e03ade4965a486c837d342e35b) Update setup to register SshKeyChangeRepository and add documentation - [`fa17445`](https://github.com/therealpaulgg/ssh-sync-server/commit/fa1744556f1f8f03afc4d61fdbfc447ca4d79763) Add instructions for updating ssh-sync-db repository - [`5f07f76`](https://github.com/therealpaulgg/ssh-sync-server/commit/5f07f7637b60f5b5d2e4e95acd6f56087d83118a) Fix test infrastructure for SSH key change history implementation - [`f8c56b9`](https://github.com/therealpaulgg/ssh-sync-server/commit/f8c56b91414851aff93ecc96e089944c88e93934) Implement comprehensive tests for SSH key change history ### 📊 Changes **18 files changed** (+1333 additions, -14 deletions) <details> <summary>View changed files</summary> ➕ `docs/db_repository_update.md` (+49 -0) ➕ `docs/sql/ssh_key_changes.sql` (+25 -0) ➕ `docs/ssh_key_change_history.md` (+36 -0) 📝 `go.mod` (+2 -1) 📝 `internal/setup/main.go` (+11 -1) ➕ `pkg/database/models/ssh_key_change.go` (+31 -0) ➕ `pkg/database/query/transaction_mock.go` (+36 -0) ➖ `pkg/database/repository/machine_test.go` (+0 -3) ➖ `pkg/database/repository/ssh_config_test.go` (+0 -3) 📝 `pkg/database/repository/ssh_key.go` (+169 -0) ➕ `pkg/database/repository/ssh_key_change.go` (+112 -0) ➕ `pkg/database/repository/ssh_key_change_mock.go` (+68 -0) ➕ `pkg/database/repository/ssh_key_change_test.go` (+301 -0) 📝 `pkg/database/repository/ssh_key_test.go` (+436 -1) 📝 `pkg/database/repository/user.go` (+29 -1) ➖ `pkg/database/repository/user_test.go` (+0 -3) 📝 `test/pgx/mock.go` (+1 -1) ➕ `test/pgx/mock_database.go` (+27 -0) </details> ### 📄 Description - [ ] Create a new SshKeyChange model to track changes to SSH keys - [ ] Add SshKeyChangeRepository interface and implementation - [ ] Modify SshKeyRepository to record changes when keys are created, updated, or deleted - [ ] Update SshKeyRepo to implement the new methods - [ ] Update the UserRepo.DeleteUserKeyTx method to record key deletions - [ ] Create tests for the new functionality - [ ] Update existing tests to account for the new change tracking Fixes #21. --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ssh-sync-server#32
No description provided.