From fbc5808e24575cf3f4d769f4739a37d0a2e40abe Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 29 Oct 2021 07:12:28 +1300 Subject: [PATCH] Add examples for external_component PR shorthand format (#1581) --- components/external_components.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/external_components.rst b/components/external_components.rst index 2d49f29f3..852459333 100644 --- a/components/external_components.rst +++ b/components/external_components.rst @@ -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:///[@] +The source field also accepts a short hand **github://** pull request from the ESPHome repository: + +.. code-block:: yaml + + external_components: + # shorthand + source: github://pr# + 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