diff --git "a/02_\347\256\227\346\263\225\345\256\236\347\216\260/code.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/code.md" similarity index 100% rename from "02_\347\256\227\346\263\225\345\256\236\347\216\260/code.md" rename to "01_\347\256\227\346\263\225\345\216\237\347\220\206/code.md" diff --git "a/02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_done_option.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_done_option.md" similarity index 100% rename from "02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_done_option.md" rename to "01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_done_option.md" diff --git "a/02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_error.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_error.md" similarity index 100% rename from "02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_error.md" rename to "01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_error.md" diff --git "a/02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_run.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_run.md" similarity index 100% rename from "02_\347\256\227\346\263\225\345\256\236\347\216\260/commit_ci_run.md" rename to "01_\347\256\227\346\263\225\345\216\237\347\220\206/commit_ci_run.md" diff --git "a/02_\347\256\227\346\263\225\345\256\236\347\216\260/end.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/end.md" similarity index 100% rename from "02_\347\256\227\346\263\225\345\256\236\347\216\260/end.md" rename to "01_\347\256\227\346\263\225\345\216\237\347\220\206/end.md" diff --git "a/01_\347\256\227\346\263\225\345\216\237\347\220\206/index.yml" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/index.yml" index f485f2901f3ddf6b502228fd6c7c9017b5e1bf2c..0105231de0b69d3bcbe8fc1f2c7b1ea72bea38d8 100644 --- "a/01_\347\256\227\346\263\225\345\216\237\347\220\206/index.yml" +++ "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/index.yml" @@ -24,16 +24,58 @@ step1: to: step2 step2: - link: '{{chapter_1_url}}' - # description: "完成当前章节学习" - transitions: - events: [ 'close_issue' ] + link: '{{chapter_1_url}}' + description: "编程作业" + transitions: + events: ['note_events'] + action: + - type: choice + with: code.md + to: step3 + +step3: + link: '{{chapter_1_url}}' + # description: "代码提交" + # 这里要开始监测 ch1 分支的代码提交,同时判断 CI 的结果,Chapter1 是提交截图 + transitions: + with: 'ch1' + events: ['push'] + action: + - type: create_pipeline + with: 'https://codechina.csdn.net/-/snippets/573/raw/master/.gitlab-ci.yml' + store: + ch1_test_url: '{{result.data.html_url}}' + ch1_test_id: '{{result.data.id}}' + - type: issue_comment.created + with: commit_ci_run.md + to: step4 + +step4: + link: '{{chapter_1_url}}' + # description: "代码提交" + # 判断CI 结果,成功的话提示下一步,失败的话提示重新 coding + transitions: + - with: + events: ['pipeline'] + left: 'failed' + operator: '=' + right: '{{object_attributes.status}}' action: - - type: create_issue - title: "第二章" - with: lin.md - store: - chapter_2_issue: '{{result.data.html_url}}' + # CI 未通过提示 + - type: pipeline_result + with: '{{ch1_test_url}}' - type: issue_comment.created - with: 001_end.md + with: commit_error.md + to: step3 + - with: '{{ch1_test_id}}' + events: ['pipeline'] + left: 'success' + operator: '=' + right: '{{object_attributes.status}}' + action: + # CI 通过提示 + - type: pipeline_result + with: '{{ch1_test_url}}' + - type: choice + with: commit_ci_done_option.md to: end diff --git "a/01_\347\256\227\346\263\225\345\216\237\347\220\206/lin.md" "b/01_\347\256\227\346\263\225\345\216\237\347\220\206/lin.md" deleted file mode 100644 index 1135d71106d043eb05614a389b78835a7e885171..0000000000000000000000000000000000000000 --- "a/01_\347\256\227\346\263\225\345\216\237\347\220\206/lin.md" +++ /dev/null @@ -1 +0,0 @@ -算法实现 \ No newline at end of file