Hi,
currently change owners use various ways to mark changes that are not yet ready for review. Recurring patterns are commit messages beginning with "[WIP]" or "DO NOT MERGE" and/or -1 votes by the change owner. A common problem with these solutions is that they cannot be used in Gerrit searches, for example if someone is looking for open changes to review, they must filter the results manually. This also affects scripts & Co. like the Wikimedia Dashboard at http://korma.wmflabs.org/browser/ that need to use heuristics to determine if a change is a work in progress and thus should be ignored for statistical purposes.
There was a bug (https://phabricator.wikimedia.org/T52842) to implement a "Work in progress" button/status with the underlying goal to prevent dashboards/queues from the added noise of "draft changes"/"[WIP]" changes, but it was declined because a button is not going to be added.
I want to suggest to 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.
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
Tim