forgejo-contrib/forgejo-cli
20
408
Fork
You've already forked forgejo-cli
51

refactor: change organization of data path to forgejo-contrib #528

Open
Fluffinity wants to merge 1 commit from Fluffinity/forgejo-cli:rename-token-storage into main
pull from: Fluffinity/forgejo-cli:rename-token-storage
merge into: forgejo-contrib:main
forgejo-contrib:main
forgejo-contrib:renovate/open-5.x-lockfile
forgejo-contrib:renovate/comrak-0.x
forgejo-contrib:renovate/uuid-1.x-lockfile
forgejo-contrib:renovate/lock-file-maintenance
forgejo-contrib:docs/contributing
forgejo-contrib:no-port-in-refspec
forgejo-contrib:login/v16.next.forgejo.org
forgejo-contrib:crates-io-publish
forgejo-contrib:0.5.x
forgejo-contrib:compile-time-fluent
forgejo-contrib:0.4.x
forgejo-contrib:localization-alias-demo
forgejo-contrib:api_url_field
Contributor
Copy link

Changes Made

The current organization for constructing the data directory for the keys file is Cyborus. This does not reflect the state of the project anymore. The new organization is forgejo-contrib instead. To prevent this becoming a breaking change the keys file will still be read at the old location, as a fallback. The KeyInfo struct will always be saved at the new location, so the user only has to use fj once to perform the migration of the keys file.

It should be noted, that this change only affects users on Windows and macOS. On Linux, only the application part gets used for constructing the project directories, leading to the same path in both versions.

While I was at it, I also replaced the current error reporting there with localized messages.

Code of Conduct

  • I agree to act in accordance with the CoC & AI Agreement.
  • This contribution was not generated by an LLM, even in part.
### Changes Made The current organization for constructing the data directory for the keys file is `Cyborus`. This does not reflect the state of the project anymore. The new organization is `forgejo-contrib` instead. To prevent this becoming a breaking change the keys file will still be read at the old location, as a fallback. The `KeyInfo` struct will always be saved at the new location, so the user only has to use fj once to perform the migration of the keys file. It should be noted, that this change only affects users on Windows and macOS. On Linux, only the application part gets used for constructing the project directories, leading to the same path in both versions. While I was at it, I also replaced the current error reporting there with localized messages. ### Code of Conduct - [x] I agree to act in accordance with the CoC & AI Agreement. - [x] This contribution was not generated by an LLM, even in part.
refactor: change organization of data path to forgejo-contrib
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
8a865de7f0
Currently tokens are stored under `Cyborus/forgejo-cli`, but we should
go with the `forgejo-contrib` organization instead. As a fallback, we
still attempt to read the old file, if we can not find the keys file at
the new location. This ensures backwards compatibility. This path should
be removed in the future, however.
Fluffinity force-pushed rename-token-storage from 8a865de7f0
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
to 82d6c46523
Some checks failed
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
2026年06月25日 16:01:04 +02:00
Compare
Fluffinity force-pushed rename-token-storage from 82d6c46523
Some checks failed
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
to 57b7d95df1
Some checks failed
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
2026年06月25日 16:03:06 +02:00
Compare
Author
Contributor
Copy link

As part of the migration the KeyInfo struct now also gets saved as soon as the file has been read from the old location. Failure of that save does not prevent the operation from running, but a warning gets issued to the user.

As part of the migration the `KeyInfo` struct now also gets saved as soon as the file has been read from the old location. Failure of that save does not prevent the operation from running, but a warning gets issued to the user.
Fluffinity force-pushed rename-token-storage from 57b7d95df1
Some checks failed
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
to 2a77dce2bf
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
2026年06月25日 16:08:06 +02:00
Compare
Member
Copy link

It may be better for the organization name to be forgejo-cli (or something similar), in case the repo's ownership changes again (i.e. hopefully some day to the forgejo org!)

It may be better for the organization name to be `forgejo-cli` (or something similar), in case the repo's ownership changes again (i.e. hopefully some day to the `forgejo` org!)
Fluffinity force-pushed rename-token-storage from 2a77dce2bf
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
to d8234c62bd
Some checks failed
ci/woodpecker/pr/check-typos Pipeline failed
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
2026年07月06日 20:11:16 +02:00
Compare
Fluffinity force-pushed rename-token-storage from d8234c62bd
Some checks failed
ci/woodpecker/pr/check-typos Pipeline failed
ci/woodpecker/pr/check Pipeline failed
ci/woodpecker/pr/check-clippy Pipeline failed
to c2f0eea650
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
2026年07月06日 20:20:21 +02:00
Compare
Cyborus approved these changes 2026年07月06日 21:20:04 +02:00
Dismissed
Fluffinity force-pushed rename-token-storage from c2f0eea650
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
to 94cefb09e9
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
2026年07月06日 22:39:42 +02:00
Compare
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Cyborus left a comment
Copy link

I suspect it would be simpler to check for the old file, move it to the new location if it's there, and continue loading as normal from there. wdyt?

I suspect it would be simpler to check for the old file, move it to the new location if it's there, and continue loading as normal from there. wdyt?
Author
Contributor
Copy link

That would be possible, although to me it changes the logic of the normal path. The old location becomes something normal we just check for, instead of it being something we only use in the case we don't find the file at the expected location. Additionally, it means we always check at the old location first, regardless of whether the file has already been migrated. So I'd prefer to keep the current logic

That would be possible, although to me it changes the logic of the normal path. The old location becomes something normal we just check for, instead of it being something we only use in the case we don't find the file at the expected location. Additionally, it means we always check at the old location first, regardless of whether the file has already been migrated. So I'd prefer to keep the current logic
Fluffinity force-pushed rename-token-storage from 94cefb09e9
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
to 5733eafe13
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
ci/woodpecker/pr/check-clippy Pipeline was successful
2026年07月07日 22:34:50 +02:00
Compare
Author
Contributor
Copy link

Rebased onto current main

Rebased onto current main
All checks were successful
ci/woodpecker/pr/check-typos Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
Required
Details
ci/woodpecker/pr/check-clippy Pipeline was successful
This pull request has changes conflicting with the target branch.
  • localization/en-US/messages.ftl
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u rename-token-storage:Fluffinity-rename-token-storage
git switch Fluffinity-rename-token-storage
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Kind/Breaking
Breaking change that won't be backward compatible
Kind/Bug
Something is not working
Kind/Design
Discussion about UI/UX design
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Kind/Upstream
This is an issue with upstream software (Forgejo) that is probably not our fault
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Suspicious
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
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
forgejo-contrib/forgejo-cli!528
Reference in a new issue
forgejo-contrib/forgejo-cli
No description provided.
Delete branch "Fluffinity/forgejo-cli:rename-token-storage"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?