feature:fork
Introduction
feature:fork forks a feature from the official organisation on the forge into your account, and clones the fork into .splent_cache ready to edit. From there you can change it and release your own version.
splent feature:fork splent_feature_notes
π Forking splent-io/splent_feature_notes into alice...
π Fork created: https://git.splent.io/alice/splent_feature_notes
β
Fork is ready.
π Cloning fork into local namespace...
β¬οΈ Cloning alice/splent_feature_notes@v1.0.0
...
π Fork unlocked for editing.
The fork lands in .splent_cache/features/<your_namespace>/<feature>@<version>/, writable.
Forking a given version
splent feature:fork splent_feature_notes --version v1.2.7
Without --version, it clones v1.0.0. When the fork has no such tag, the default branch is cloned.
How it works
- It forks
splent-io/<feature>into theSPLENT_FORGE_USERaccount through the forge API.SPLENT_DEFAULT_ORGchanges the upstream organisation. - It waits for the fork, up to five checks three seconds apart. When it is still not ready, it warns
Fork may still be processing.and clones anyway. - It clones the fork with
feature:cloneand makes the copy writable.
Reference
| Argument / Option | Description |
|---|---|
FEATURE_NAME |
The repository to fork, such as splent_feature_notes |
-v, --version |
The version to clone. Defaults to v1.0.0 |
| Exit code | When |
|---|---|
| 1 | SPLENT_FORGE_TOKEN or SPLENT_FORGE_USER is not set, or the clone fails |
| 2 | The forge cannot be reached, refuses the fork (rate limit, access denied or another HTTP error), or answers without the forkβs URL |
Requirements
SPLENT_FORGE_TOKEN, with permission to create repositories in that account.GITHUB_TOKENis read when it is unset.SPLENT_FORGE_USER, the account that receives the fork.GITHUB_USERis read when it is unset.
See also
feature:clonecopies a release into the cache without forking.feature:releasepublishes your version.