Add examples for external_component PR shorthand format (#1581)

This commit is contained in:
Jesse Hills 2021-10-29 07:12:28 +13:00 committed by GitHub
parent ce8e268483
commit fbc5808e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,10 @@ Bundled components can be overridden using this feature.
- source: github://esphome/esphome@dev
components: [ rtttl ]
# equivalent shorthand for GitHub pull request
- source: github://pr#2639
components: [ rtttl ]
# use all components from a local folder
- source:
type: local
@ -165,6 +169,14 @@ The source field accepts a short hand **github://** resource:
# shorthand
source: github://<user or org>/<repository name>[@<branch or tag>]
The source field also accepts a short hand **github://** pull request from the ESPHome repository:
.. code-block:: yaml
external_components:
# shorthand
source: github://pr#<number>
Under the hood, during validation, ESPHome will clone the git repository into the hidden ``.esphome``
folder and components will then be loaded from this local copy. The local path of the cloned repository
varies per repository name and ref name, so repositories with different refs are considered different