Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: recipe_modules/git_cl/example.py

Issue 2087093002: Add upload and issue to git_cl recipe module (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Re-gen expectations Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « recipe_modules/git_cl/api.py ('k') | recipe_modules/git_cl/example.expected/basic.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- coding: utf-8 -*-
1 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 4 # found in the LICENSE file.
4 5
5 from recipe_engine.config_types import Path 6 from recipe_engine.config_types import Path
6 7
7 8
8 DEPS = [ 9 DEPS = [
9 'git_cl', 10 'git_cl',
10 'recipe_engine/path', 11 'recipe_engine/path',
11 'recipe_engine/raw_io', 12 'recipe_engine/raw_io',
12 'recipe_engine/step', 13 'recipe_engine/step',
13 ] 14 ]
14 15
15 16
16 def RunSteps(api): 17 def RunSteps(api):
18 api.git_cl.upload(u"Do the thing foobar\nNow with emoji: 😄")
19 api.git_cl.issue()
17 result = api.git_cl.get_description( 20 result = api.git_cl.get_description(
18 patch='https://code.review/123', codereview='rietveld', suffix='build') 21 patch='https://code.review/123', codereview='rietveld', suffix='build')
19 api.git_cl.set_description( 22 api.git_cl.set_description(
20 'bammmm', patch='https://code.review/123', codereview='rietveld') 23 'bammmm', patch='https://code.review/123', codereview='rietveld')
21 api.step('echo', ['echo', result.stdout]) 24 api.step('echo', ['echo', result.stdout])
22 25
23 api.git_cl.set_config('basic') 26 api.git_cl.set_config('basic')
24 api.git_cl.c.repo_location = api.path.mkdtemp('fakerepo') 27 api.git_cl.c.repo_location = api.path.mkdtemp('fakerepo')
25 28
26 api.step('echo', ['echo', api.git_cl.get_description().stdout]) 29 api.step('echo', ['echo', api.git_cl.get_description().stdout])
27 30
28 api.git_cl.set_description('new description woo') 31 api.git_cl.set_description('new description woo')
29 32
30 api.step('echo', ['echo', api.git_cl.get_description().stdout]) 33 api.step('echo', ['echo', api.git_cl.get_description().stdout])
31 34
32 def GenTests(api): 35 def GenTests(api):
33 yield ( 36 yield (
34 api.test('basic') + 37 api.test('basic') +
35 api.override_step_data( 38 api.override_step_data(
36 'git_cl description (build)', stdout=api.raw_io.output('hi')) + 39 'git_cl description (build)', stdout=api.raw_io.output('hi')) +
37 api.override_step_data( 40 api.override_step_data(
38 'git_cl description', stdout=api.raw_io.output('hey')) + 41 'git_cl description', stdout=api.raw_io.output('hey')) +
39 api.override_step_data( 42 api.override_step_data(
40 'git_cl description (2)', stdout=api.raw_io.output( 43 'git_cl description (2)', stdout=api.raw_io.output(
41 'new description woo')) 44 'new description woo'))
42 ) 45 )
43 46
OLDNEW
« no previous file with comments | « recipe_modules/git_cl/api.py ('k') | recipe_modules/git_cl/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698