diff --git a/.ci/ci.yml.tmpl b/.ci/ci.yml.tmpl index 2f46a1a1e98d..6472fab77be8 100644 --- a/.ci/ci.yml.tmpl +++ b/.ci/ci.yml.tmpl @@ -98,10 +98,29 @@ resources: token: ((github-account.password)) jobs: + - name: respond-to-community-pr + plan: + - get: magic-modules-external-prs + trigger: true + - get: magic-modules-gcp + # NOTE: we do NOT run a script from the external PR! + - task: write-welcome-message + file: magic-modules-gcp/.ci/magic-modules/welcome-contributor.yml + - put: magic-modules-external-prs + params: + status: pending + path: magic-modules-external-prs + label: community + comment: comment/pr_comment + assignee_file: comment/assignee + get_params: + skip_clone: true + - name: authorize-single-rev plan: - get: magic-modules-external-prs trigger: false + passed: [respond-to-community-pr] - put: magic-modules-new-prs params: status: pending diff --git a/.ci/magic-modules/welcome-contributor.sh b/.ci/magic-modules/welcome-contributor.sh new file mode 100644 index 000000000000..1a70640a0a73 --- /dev/null +++ b/.ci/magic-modules/welcome-contributor.sh @@ -0,0 +1,10 @@ +#!/bin/bash +echo > comment/pr_comment << EOF +Hello! I am a robot who works on Magic Modules PRs. + +I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. They will authorize it to run through our CI pipeline, which will generate downstream PRs. + +Thanks for your contribution! A human will be with you soon. +EOF + +shuf -n 1 <(printf "ndmckinley\nrambleraptor\nchrisst\nrileykarson\nSirGitsalot\nslevenick") > comment/assignee diff --git a/.ci/magic-modules/welcome-contributor.yml b/.ci/magic-modules/welcome-contributor.yml new file mode 100644 index 000000000000..c04761dd55fe --- /dev/null +++ b/.ci/magic-modules/welcome-contributor.yml @@ -0,0 +1,23 @@ +--- +# This file takes one input: magic-modules in detached-HEAD state. +# It spits out "magic-modules-branched", a magic-modules repo on a new branch (named +# after the HEAD commit on the PR). +platform: linux + +image_resource: + type: docker-image + source: + # This task requires a container with 'git', 'python', and the pip + # package 'pygithub'. + repository: gcr.io/magic-modules/python + tag: '1.0' + +inputs: + - name: magic-modules-external-prs + - name: magic-modules-gcp + +outputs: + - name: comment + +run: + path: magic-modules-gcp/.ci/magic-modules/welcome-contributor.sh diff --git a/build/terraform b/build/terraform index 1bc6bdacb86b..3fc3c5d61a8e 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 1bc6bdacb86b656a8d2740e34b3ace25b8c0ce34 +Subproject commit 3fc3c5d61a8e265d242661c4015bea7cb806e06b diff --git a/build/terraform-beta b/build/terraform-beta index 4d5816e69b7f..9afa7ac33bcc 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 4d5816e69b7f519f7c477b00e29b7a6697620e41 +Subproject commit 9afa7ac33bcc5cd235ad27f788a39c12f666ef0c