[PR #540] [MERGED] refactor: Replace create-one-time-access-token script with in-app functionality (v1.0) #742

Open
opened 2025-10-07 00:21:37 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/540
Author: @ItalyPaleAle
Created: 5/17/2025
Status: Merged
Merged: 5/18/2025
Merged by: @stonith404

Base: v1.0.0Head: one-time-at-go


📝 Commits (3)

📊 Changes

8 files changed (+132 additions, -136 deletions)

View changed files

📝 Dockerfile (+1 -2)
📝 backend/cmd/main.go (+24 -1)
📝 backend/internal/bootstrap/bootstrap.go (+1 -1)
📝 backend/internal/bootstrap/db_bootstrap.go (+1 -1)
backend/internal/cmds/one_time_access_token.go (+81 -0)
📝 backend/internal/model/user.go (+1 -0)
📝 backend/internal/service/user_service.go (+23 -14)
scripts/create-one-time-access-token.sh (+0 -117)

📄 Description

As discussed here: https://github.com/pocket-id/pocket-id/pull/533#discussion_r2093286087

Removes the create-one-time-access-token.sh script and embeds the functionality within the Go binary.

It can now be invokes as pocket-id one-time-access-token <user name or email>.

This helps because:

  1. Reduces complexity and improves maintenability because there's no duplicate functionality in the shell script
  2. Ensures the shell script works well with SQLite even after changing the connection string format

🔄 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/pocket-id/pocket-id/pull/540 **Author:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Created:** 5/17/2025 **Status:** ✅ Merged **Merged:** 5/18/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `v1.0.0` ← **Head:** `one-time-at-go` --- ### 📝 Commits (3) - [`afd1334`](https://github.com/pocket-id/pocket-id/commit/afd1334848ea22965d39270f6ddc5b2878462578) refactor: Replace create-one-time-access-token script with in-app functionality (v1.0) - [`c92110f`](https://github.com/pocket-id/pocket-id/commit/c92110f662411fd84dca5e140c14ea871f85a26c) Merge branch 'v1.0.0' of https://github.com/pocket-id/pocket-id into one-time-at-go - [`ddd6886`](https://github.com/pocket-id/pocket-id/commit/ddd6886c79cf4d7cf918b5e2dc89b7e89e521b61) Move NewOneTimeAccessToken to the user_service file ### 📊 Changes **8 files changed** (+132 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+1 -2) 📝 `backend/cmd/main.go` (+24 -1) 📝 `backend/internal/bootstrap/bootstrap.go` (+1 -1) 📝 `backend/internal/bootstrap/db_bootstrap.go` (+1 -1) ➕ `backend/internal/cmds/one_time_access_token.go` (+81 -0) 📝 `backend/internal/model/user.go` (+1 -0) 📝 `backend/internal/service/user_service.go` (+23 -14) ➖ `scripts/create-one-time-access-token.sh` (+0 -117) </details> ### 📄 Description As discussed here: https://github.com/pocket-id/pocket-id/pull/533#discussion_r2093286087 Removes the create-one-time-access-token.sh script and embeds the functionality within the Go binary. It can now be invokes as `pocket-id one-time-access-token <user name or email>`. This helps because: 1. Reduces complexity and improves maintenability because there's no duplicate functionality in the shell script 2. Ensures the shell script works well with SQLite even after changing the connection string format --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-07 00:21:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#742