release-it/release-it

Extendable configuration

juancarlosjr97 opened this issue · 3 comments

Following the idea of #934, let's add as the first extendable configuration to the following:

  1. Extend the configuration using the extends and merge the local configuration with the remote configuration
  2. The local will always take precedence over the extends configuration
  3. The extends must be accessible via the internet

Note: I think as part of the first iteration, public access is enough to make it work, and then we can add authorization to make it work behind a private access repo.

So, I was thinking, of following a similar approach to Renovate for Shareable Configuration Presets.

Using a pattern matching as follows

  • github>owner/repo
  • github>owner/repo#tag
  • github>owner/repo:file#tag

Then, take that configuration for example

{
    "$schema": "https://unpkg.com/release-it@17/schema/release-it.json",
    "extends":  "github>juancarlosjr97/release-it-configuration"
}

Then, merge with local, and then all goes as normal execution.

I have an initial PR #1181, just need to write tests for it to make sure all is passing, but I tested this using this project from local https://github.com/juancarlosjr97/release-it-configuration-test using this configuration https://github.com/juancarlosjr97/release-it-configuration-test/blob/main/.release-it.json#L3.

PR ready to review with test and documentation added #1181 :)