Skip to content

Commit

Permalink
Merge pull request #619 from python-gitlab/issue/595
Browse files Browse the repository at this point in the history
[docs] Add an example of pipeline schedule vars listing
  • Loading branch information
max-wittig committed Nov 3, 2018
2 parents bc6ce04 + f7fbfca commit fcce7a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/gl_objects/builds.rst
Expand Up @@ -141,6 +141,13 @@ Delete a schedule::

sched.delete()

List schedule variables::

# note: you need to use get() to retrieve the schedule variables. The
# attribute is not present in the response of a list() call
sched = projects.pipelineschedules.get(schedule_id)
vars = sched.attributes['variables']

Create a schedule variable::

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

0 comments on commit fcce7a3

Please sign in to comment.