Remove zuul:configobject

This isn't currently being used any differently than zuul:attr
so just switch to that.

Change-Id: I5d78f86874f7da6b1f556d38825a97668a2907c2
This commit is contained in:
James E. Blair 2017-07-28 15:47:35 -07:00
parent 88c188d8d0
commit a6abb70c82
4 changed files with 5 additions and 21 deletions

View File

@ -192,7 +192,7 @@ This indicates that changes originating from the Gerrit connection
named *my-gerrit* must have a Code Review vote of +2 in order to be
enqueued into the pipeline.
.. zuul:configobject:: pipeline.require.<source>
.. zuul:attr:: pipeline.require.<source>
The dictionary passed to the Gerrit pipeline `require` attribute
supports the following attributes:
@ -250,7 +250,7 @@ enqueued into the pipeline.
A string value that corresponds with the status of the change
reported by the trigger.
.. zuul:configobject:: pipeline.reject.<source>
.. zuul:attr:: pipeline.reject.<source>
The `reject` attribute is the mirror of the `require` attribute. It
also accepts a dictionary under the connection name. This

View File

@ -216,7 +216,7 @@ This indicates that changes originating from the GitHub connection
named *my-github* must have an approved code review in order to be
enqueued into the pipeline.
.. zuul:configobject:: pipeline.require.<source>
.. zuul:attr:: pipeline.require.<source>
The dictionary passed to the GitHub pipeline `require` attribute
supports the following attributes:
@ -290,7 +290,7 @@ enqueued into the pipeline.
indicated label (or labels).
.. zuul:configobject:: pipeline.reject.<source>
.. zuul:attr:: pipeline.reject.<source>
The `reject` attribute is the mirror of the `require` attribute. It
also accepts a dictionary under the connection name. This

View File

@ -122,7 +122,7 @@ success, the pipeline reports back to Gerrit with a *Verified* vote of
.. TODO: See TODO for more annotated examples of common pipeline configurations.
.. zuul:configobject:: pipeline
.. zuul:attr:: pipeline
The attributes available on a pipeline are as follows (all are
optional unless otherwise specified):

View File

@ -20,15 +20,11 @@ from sphinx.directives import ObjectDescription
class ZuulConfigObject(ObjectDescription):
object_names = {
'attr': 'attribute',
'configobject': 'configuration object',
}
def get_path(self):
obj = self.env.ref_context.get('zuul:configobject')
attr_path = self.env.ref_context.get('zuul:attr_path', [])
path = []
if obj:
path.append(obj)
if attr_path:
path.extend(attr_path)
return path
@ -60,17 +56,6 @@ class ZuulConfigObject(ObjectDescription):
targetname, '', None))
class ZuulConfigobjectDirective(ZuulConfigObject):
has_content = True
def before_content(self):
self.env.ref_context['zuul:configobject'] = self.names[-1]
def handle_signature(self, sig, signode):
signode += addnodes.desc_name(sig, sig)
return sig
class ZuulAttrDirective(ZuulConfigObject):
has_content = True
@ -110,7 +95,6 @@ class ZuulDomain(Domain):
label = 'Zuul'
directives = {
'configobject': ZuulConfigobjectDirective,
'attr': ZuulAttrDirective,
'value': ZuulValueDirective,
}