Currently there is no standard, easily parsable-by-machine way to mark a Gerrit change as work in progress (WIP). This means that either dashboards and queries need to be filtered by a human brain, or each developer has to amend their search strings by excluding "DO NOT MERGE", "WIP", -1 votes by the changeset owner, etc. and hope that they don't miss false negatives.
Add a new label "WIP", inspired by OpenStack's "Workflow" label. Its "neutral" value is 0 ("Ready for reviews"). If it is "voted" to -1 ("Work in progress"), the change cannot be submitted. This vote will stick with new uploads until it is changed back to 0.
For searches, this will allow Gerrit users to restrict search results by adding "label:WIP+0" to their filters.
Mailing list (wikitech-l) discussion summary from @greg: https://lists.wikimedia.org/pipermail/wikitech-l/2016-May/085611.html
How to do it from Tim L (from Sept 2015) https://lists.wikimedia.org/pipermail/wikitech-l/2015-September/083172.html :
Untested, the change would be something like:
diff --git a/project.config b/project.config index 151eebd..93291e1 100644 --- a/project.config +++ b/project.config @@ -12,6 +12,7 @@ owner = group ldap/ops label-Code-Review = -2..+2 group Project Owners label-Code-Review = -1..+1 group Registered Users + label-WIP = -1..+0 group Registered Users create = group Project Owners editTopicName = group Registered Users viewDrafts = group JenkinsBot @@ -78,6 +79,11 @@ value = +2 Looks good to me, approved copyAllScoresOnTrivialRebase = true copyAllScoresIfNoCodeChange = true +[label "WIP"] + function = AnyWithBlock + value = -1 Work in progress + value = 0 Ready for reviews + copyMinScore = true [access "refs/meta/dashboards/*"] create = group Project Owners create = group platform-engineering
Related: T52842