fj secret/variable --org scope for shared CI credentials #137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Task
Add an org (and optionally user) scope to
fj secretandfj variable:--org <name>(consider--userfor user-level secrets, which Forgejo also supports). Default remains repo scope inferred from the remote./orgs/{org}/actions/secretsand/orgs/{org}/actions/variableswhen--orgis set; request/response shapes match the repo endpoints already implemented insrc/api/workflow_secrets.rs.Source: rasterstate/fj#127.
Priority
p3. Org-level secrets are how teams avoid copy-pasting the same
REGISTRY_TOKEN/DEPLOY_KEYinto many repos, so this is real provisioning value, but the audience is narrower (org admins, one-time setup) than the per-run scripting primitives, and thefj api -X PUT /orgs/.../actions/secrets/...escape hatch works today.Reason
Every secret/variable call is hard-wired to the repo path:
list_secrets/set_secret/list_variables/set_variable/delete_variableall buildcrate::api::repo_path(owner, name)+/actions/...(src/api/workflow_secrets.rs). The CLI args carry onlyRepoFlagwith no scope selector (src/cli/workflow_secret.rs:29-61), andvar/secretshare those args viaworkflow_variable.rs. Forgejo exposes the org surface at the mirror paths, so the gap is purely on the fj side; no new verbs, no new auth, rendering unchanged.Acceptance
fj secret list/set/delete --org <name>andfj variable list/set/delete --org <name>target/orgs/{org}/actions/....--orgis mutually exclusive with repo scope; default stays repo scope inferred from the remote.--userscope for user-level secrets/variables.src/client/integration_tests.rsfor the org-scoped paths.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
None. The hand-rolled
fj apiworkaround for this also re-exposes the stdin gap in rasterstate/fj#126.Size
M