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

  1. It forks splent-io/<feature> into the SPLENT_FORGE_USER account through the forge API. SPLENT_DEFAULT_ORG changes the upstream organisation.
  2. 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.
  3. It clones the fork with feature:clone and 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_TOKEN is read when it is unset.
  • SPLENT_FORGE_USER, the account that receives the fork. GITHUB_USER is read when it is unset.

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es