From f04c1ddcbe6a0e9ab0af87679d17af9974cefea1 Mon Sep 17 00:00:00 2001 From: roselyn Date: Tue, 3 Nov 2026 18:21:55 +0000 Subject: [PATCH 1/2] Add labels to plugin_repo build defs --- rules/subrepo_rules.build_defs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rules/subrepo_rules.build_defs b/rules/subrepo_rules.build_defs index d1c67dabd5..03c3daf91b 100644 --- a/rules/subrepo_rules.build_defs +++ b/rules/subrepo_rules.build_defs @@ -318,7 +318,7 @@ def local_repository(name:str, path:str): path = path, ) -def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build", hashes:list=[]): +def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build", hashes:list=[], labels:list=[]): """Defines a please plugin to use from the configured plugin repositories. See https://please.build/config.html#please.pluginrepositories for more information. @@ -328,6 +328,7 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build" plugin (str): The name of the plugin. Defaults to the name of this rule. owner (str): The owner of the plugin to be passed to the template URLS. hashes (list): A list of valid hashes for the downloaded archive file. + labels (list): Any labels which are applied to the build target. """ plugin = plugin or name urls = [url.format(owner=owner, revision=revision, plugin=plugin) for url in CONFIG.PLUGIN_REPOS] @@ -355,6 +356,7 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build" name = name.replace("-", "_"), dep = extract_rule, plugin = True, + labels = labels, ) return extract_rule From 136751122fbbd76f75bf6aa7334730ba80ddeb18 Mon Sep 17 00:00:00 2001 From: roselyn Date: Wed, 4 Nov 2026 12:03:47 +0000 Subject: [PATCH 2/2] Switch the labels from the subrepo, to the remote file --- rules/subrepo_rules.build_defs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/subrepo_rules.build_defs b/rules/subrepo_rules.build_defs index 03c3daf91b..1bf0e44d47 100644 --- a/rules/subrepo_rules.build_defs +++ b/rules/subrepo_rules.build_defs @@ -339,6 +339,7 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build" url = urls, out = name + '_' + basename(urls[0]), hashes = hashes, + labels = labels, ) extract_rule = build_rule( name = name, @@ -356,7 +357,6 @@ def plugin_repo(name:str, revision:str, plugin:str="", owner:str="please-build" name = name.replace("-", "_"), dep = extract_rule, plugin = True, - labels = labels, ) return extract_rule