Skip to content

Commit 1d451ea

Browse files
committed
git: option not to update series on tags
Currently, when a new tag is sent on the mailing list, the series is updated in the Git repository. The push is done with '-o ci.skip', but this seems to be something specific to GitLab. It has no effects with GitHub for example. Not to waste resources on retesting everything and sending notifications once a tag is shared, a new per-project option has been added: update_series_on_tags Not to change the current behaviour, series will continue to be updated on new tags by default, except if this option is explicitly disabled. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 831a92b commit 1d451ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: mods/git.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ class GitModule(PatchewModule):
8787
desc="Publicly visible URL template for applied branch, where %t will be replaced by the applied tag name",
8888
required=True,
8989
),
90+
schema.BooleanSchema(
91+
"update_series_on_tags",
92+
"Update series on new tags",
93+
desc="Whether series are pushed (overriden) when new tags are sent on the mailing list, on by default",
94+
default=True,
95+
),
9096
],
9197
)
9298

@@ -109,7 +115,10 @@ def mark_as_pending_apply(self, series, data={}):
109115
r.save()
110116

111117
def on_tags_update(self, event, series, **params):
112-
if series.is_complete:
118+
config = self.get_project_config(series.project)
119+
update_series_on_tags = config.get("update_series_on_tags", True)
120+
121+
if update_series_on_tags and series.is_complete:
113122
self.mark_as_pending_apply(
114123
series,
115124
{

0 commit comments

Comments
 (0)