index.yml 3.0 KB
Newer Older
TANG-3-'s avatar
TANG-3- 已提交
1 2
# 在所有的任务之前执行
before:
TANG-3-'s avatar
TANG-3- 已提交
3
  link: '{{chapter_1_issue}}'
TANG-3-'s avatar
TANG-3- 已提交
4 5 6
  transitions:
    action:
      - type: create_issue
TANG-3-'s avatar
TANG-3- 已提交
7 8
        title: "Python初体验"
        with: 01_step1.md
TANG-3-'s avatar
TANG-3- 已提交
9
        store:
TANG-3-'s avatar
TANG-3- 已提交
10
          chapter_1_issue: '{{result.data.html_url}}'
TANG-3-'s avatar
TANG-3- 已提交
11 12 13 14 15 16
      - type: choice
        with: first.md
    to: step1

# Task 列表
step1:
TANG-3-'s avatar
TANG-3- 已提交
17
  link: '{{chapter_1_issue}}'
TANG-3-'s avatar
TANG-3- 已提交
18
  description: "Python语言的五个特点"
TANG-3-'s avatar
TANG-3- 已提交
19 20 21 22
  transitions:
    events: ['note_events']
    action:
      - type: issue_comment.created
TANG-3-'s avatar
TANG-3- 已提交
23 24 25
        with: 01_step2.md
      - type: choice
        with: exam.md
TANG-3-'s avatar
TANG-3- 已提交
26 27 28
    to: step2

step2:
TANG-3-'s avatar
TANG-3- 已提交
29
  link: '{{chapter_1_issue}}'
hi_Yihsuan's avatar
hi_Yihsuan 已提交
30
  #description: "小测验"
TANG-3-'s avatar
TANG-3- 已提交
31 32 33
  transitions:
    events: ['note_events']
    action:
TANG-3-'s avatar
TANG-3- 已提交
34
      - type: choice
TANG-3-'s avatar
TANG-3- 已提交
35 36
        with: 01_step3_choice.md
    to: step3
TANG-3-'s avatar
TANG-3- 已提交
37

TANG-3-'s avatar
TANG-3- 已提交
38
step3:
TANG-3-'s avatar
TANG-3- 已提交
39
  link: '{{chapter_1_issue}}'
TANG-3-'s avatar
TANG-3- 已提交
40
  description: "Python语言支持多种不同的编程运行方式"
TANG-3-'s avatar
TANG-3- 已提交
41 42 43
  transitions:
    events: ['note_events']
    action:
TANG-3-'s avatar
TANG-3- 已提交
44
      - type: issue_comment.created
TANG-3-'s avatar
TANG-3- 已提交
45
        with: 01_step4.md
TANG-3-'s avatar
TANG-3- 已提交
46
      - type: choice
TANG-3-'s avatar
TANG-3- 已提交
47
        with: next.md
TANG-3-'s avatar
TANG-3- 已提交
48 49 50
    to: step4

step4:
TANG-3-'s avatar
TANG-3- 已提交
51
  link: '{{chapter_1_issue}}'
TANG-3-'s avatar
TANG-3- 已提交
52
  description: "Python内置函数——print函数"
TANG-3-'s avatar
TANG-3- 已提交
53
  transitions:
TANG-3-'s avatar
TANG-3- 已提交
54
    events: ['note_events']
TANG-3-'s avatar
TANG-3- 已提交
55
    action:
TANG-3-'s avatar
TANG-3- 已提交
56 57
      - type: issue_comment.created
        with: 01_step5_code.md
cpongo3's avatar
cpongo3 已提交
58
    to: step7
TANG-3-'s avatar
TANG-3- 已提交
59

60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
step5:
  link: '{{chapter_1_issue}}'
  #description: "提交代码"
  transitions:
    with: 'ch101'
    events: ['push']
    action:
      - type: create_pipeline
        with: https://codechina.csdn.net/-/snippets/582/raw/master/.gitlab-ci.yml
        store:
          ch101_test_url: '{{result.data.html_url}}'
          ch101_test_id: '{{result.data.id}}'
      - type: issue_comment.created
        with: commit_ci_run_ch101.md
    to: step6
TANG-3-'s avatar
TANG-3- 已提交
75

76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
step6:
  link: '{{chapter_1_issue}}'
  # description: "代码提交"
  # 判断CI 结果,成功的话提示下一步,失败的话提示重新 coding
  transitions:
    - with:
      events: ['pipeline']
      left: 'failed'
      operator: '='
      right: '{{object_attributes.status}}'
      action:
        # CI 未通过提示
        - type: pipeline_result
          with: '{{ch101_test_url}}'
        - type: issue_comment.created
          with: commit_error_ch101.md
      to: step5
TANG-3-'s avatar
TANG-3- 已提交
93

94 95 96 97 98 99 100 101 102 103 104 105 106 107
    - with: '{{ch101_test_id}}'
      events: ['pipeline']
      left: 'success'
      operator: '='
      right: '{{object_attributes.status}}'
      action:
        # CI 通过提示
        - type: pipeline_result
          with: '{{ch101_test_url}}'
        - type: issue_comment.created
          with: commit_ci_done_option.md
        - type: issue_comment.created
          with: chapter_1_end_1.md
      to: step7
TANG-3-'s avatar
TANG-3- 已提交
108 109

step7:
TANG-3-'s avatar
TANG-3- 已提交
110
  link: '{{chapter_1_issue}}'
TANG-3-'s avatar
TANG-3- 已提交
111 112
#  description: "完成当前章节学习"
  transitions:
TANG-3-'s avatar
TANG-3- 已提交
113
    events: ['close_issue']
TANG-3-'s avatar
TANG-3- 已提交
114 115
    action:
      - type: create_issue
TANG-3-'s avatar
TANG-3- 已提交
116
        title: "数据类型"
117
        with: 002_1_paragraph_basic.md
TANG-3-'s avatar
TANG-3- 已提交
118 119 120
        store:
          chapter_2_issue: '{{result.data.html_url}}'
      - type: issue_comment.created
TANG-3-'s avatar
TANG-3- 已提交
121
        with: chapter_1_end_2.md
TANG-3-'s avatar
TANG-3- 已提交
122
    to: end