Skip to content

Commit fcce7a3

Browse files
authored
Merge pull request #619 from python-gitlab/issue/595
[docs] Add an example of pipeline schedule vars listing
2 parents bc6ce04 + f7fbfca commit fcce7a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/gl_objects/builds.rst

+7
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ Delete a schedule::
141141

142142
sched.delete()
143143

144+
List schedule variables::
145+
146+
# note: you need to use get() to retrieve the schedule variables. The
147+
# attribute is not present in the response of a list() call
148+
sched = projects.pipelineschedules.get(schedule_id)
149+
vars = sched.attributes['variables']
150+
144151
Create a schedule variable::
145152

146153
var = sched.variables.create({'key': 'foo', 'value': 'bar'})

0 commit comments

Comments
 (0)