Back to Codeberg

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

forgejo-contrib-forgejo-cli-pulls-528.md

latest22.0 KB
Original Source

forgejo-contrib/forgejo-cli

Watch20

Star402

Fork

You've already forked forgejo-cli

51

CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity

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/lock-file-maintenance

forgejo-contrib:renovate/serde-saphyr-0.x

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

Conversation 6Commits 1Files changed 2 +46 -8

Fluffinity commented 2026-06-25 15:02:34 +02:00

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.

Fluffinity added 1 commit 2026-06-25 15:02:45 +02:00

refactor: change organization of data path to forgejo-contrib...

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

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

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

to 82d6c46523

Some checks failed

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

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

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

to 57b7d95df1

Some checks failed

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

2026-06-25 16:03:06 +02:00 Compare

Fluffinity commented 2026-06-25 16:03:52 +02:00

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

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

to 2a77dce2bf

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

2026-06-25 16:08:06 +02:00 Compare

Cyborus commented 2026-07-06 20:07:59 +02:00

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!)

👍 1

Fluffinity force-pushed rename-token-storage from 2a77dce2bf

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

to d8234c62bd

Some checks failed

ci/woodpecker/pr/check-typos Pipeline failed

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

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

Details

ci/woodpecker/pr/check Pipeline failed

Details

ci/woodpecker/pr/check-clippy Pipeline failed

Details

to c2f0eea650

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

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

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

to 94cefb09e9

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

2026-07-06 22:39:42 +02:00 Compare

Fluffinity dismissed Cyborus's review 2026-07-06 22:39:42 +02:00

Reason:

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

Cyborus requested changes 2026-07-07 20:26:19 +02:00

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?

Fluffinity commented 2026-07-07 22:01:52 +02:00

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

👍 1

Fluffinity force-pushed rename-token-storage from 94cefb09e9

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

to 5733eafe13

All checks were successful

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

2026-07-07 22:34:50 +02:00 Compare

Fluffinity commented 2026-07-07 22:35:19 +02:00

Author

Contributor

Copy link

Rebased onto current main

Rebased onto current main

All checks were successful Hide all checks

ci/woodpecker/pr/check-typos Pipeline was successful

Details

ci/woodpecker/pr/check Pipeline was successful

Required Details

ci/woodpecker/pr/check-clippy Pipeline was successful

Details

This pull request has changes requested by an official reviewer.

You are not authorized to merge this pull request.

View command line instructions

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.

Reviewers

No reviewers

Cyborus

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

](#)

No labels Kind/Breaking Kind/Bug Kind/Design Kind/Documentation Kind/Enhancement Kind/Feature Kind/Security Kind/Testing Kind/Upstream [ Priority

Critical ](/forgejo-contrib/forgejo-cli/pulls?labels=173012) [ Priority

High ](/forgejo-contrib/forgejo-cli/pulls?labels=173013) [ Priority

Low ](/forgejo-contrib/forgejo-cli/pulls?labels=173015) [ Priority

Medium ](/forgejo-contrib/forgejo-cli/pulls?labels=173014) [ Reviewed

Confirmed ](/forgejo-contrib/forgejo-cli/pulls?labels=173007) [ Reviewed

Duplicate ](/forgejo-contrib/forgejo-cli/pulls?labels=173005) [ Reviewed

Invalid ](/forgejo-contrib/forgejo-cli/pulls?labels=173006) [ Reviewed

Won't Fix ](/forgejo-contrib/forgejo-cli/pulls?labels=173008) [ Status

Abandoned ](/forgejo-contrib/forgejo-cli/pulls?labels=173011) [ Status

Blocked ](/forgejo-contrib/forgejo-cli/pulls?labels=173010) [ Status

Need More Info ](/forgejo-contrib/forgejo-cli/pulls?labels=173009) Suspicious

Milestone

Clear milestone

No items

No milestone

Projects

Clear projects

No items

No project

Assignees

Clear assignees

No assignees

2 participants

Notifications Subscribe

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

WritePreview

Loading…

Add table

| Rows | | | Columns | |

CancelOK

Add a link

Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.

CancelOK

CancelSave

Reference in a new issue

Repository

forgejo-contrib/forgejo-cli

Title

Body

Create issue

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?

No Yes