Skip to content

Commit

Permalink
Merge pull request #1 from githubpartners/fix-config
Browse files Browse the repository at this point in the history
Add logic for course
  • Loading branch information
brianamarie authored Aug 21, 2020
2 parents 920279c + 458a868 commit f41c15e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 17 deletions.
53 changes: 36 additions & 17 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,54 @@ template:
name: partner-bootcamp-actions
before:
- type: createIssue
title: Setting up your environment!
title: "Activity 1: Setting up your environment!"
body: new-issue.md
labels:
- provision probot app
store:
EnvironmentIssueUrl: '{{ result.data.html_url }}'
EnvironmentIssueNumber: '{{ result.data.number }}'
- type: createPullRequest
title: Creating Azure Resources
title: "Activity 2: Creating Azure Resources"
body: create-azure-resources.md
head: creating-azure-resources
store:
AzureSetupPRNumber: '{{ result.data.number }}'
AzureSetupPRUrl: '{{ result.data.html_url }}'

- type: createPullRequest
title: "Activity 3: Add a CI/CD workflow"
head: add-ci-cd-workflow
body: ci-cd-instructions.md

- type: createPullRequest
title: "Activity 4: Add a probot feature"
head: add-probot-feature
body: probot-feature-instructions.md

- type: createPullRequest
title: "Activity 5: Add a teardown workflow"
head: add-teardown-workflow
body: teardown-instructions.md



steps:
- title: First step
description: The first step in your course
event: pull_request.closed
link: "{{ repoUrl }}"
link: "{{ store.EnvironmentIssueUrl }}"
actions:
# if the pull was merged then comment in the issue with steps
# to trigger the workflow
- type: gate
every: true
gates:
- left: '%payload.action%'
operator: ===
right: closed
- left: '%payload.pull_request.merged%'
else:
- type: closeIssue
issue: Setting up your environment!
- type: gate
left: '{{ payload.pull_request.merged }}'
else:
- type: closeIssue
issue: '{{ store.EnvironmentIssueNumber }}'
# else if pull was simply closed, then also close the issue
# and don't comment
- type: respond
with: trigger-azure-config.md
issue: Setting up your environment!
# Respond with "all-set" for next class... see you soon!
- type: respond
with: trigger-azure-config.md
issue: Setting up your environment!
# Respond with "all-set" for next class... see you soon!
1 change: 1 addition & 0 deletions responses/ci-cd-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Here's some instructions about the CICD workflow
1 change: 1 addition & 0 deletions responses/probot-feature-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Here's some instructions about this new probot feature we're introducing...
1 change: 1 addition & 0 deletions responses/teardown-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hey, now we're gonna tear down the env...

0 comments on commit f41c15e

Please sign in to comment.