Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF DevEx: repo adoption #204

Merged
merged 3 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @hashicorp/terraform-devex
40 changes: 40 additions & 0 deletions .github/workflows/add-content-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Based on https://github.com/leonsteinhaeuser/project-beta-automations

name: "Add Issues/PRs to TF Provider DevEx team board"

on:
issues:
types: [opened, reopened]
pull_request_target:
# NOTE: The way content is added to project board is equivalent to an "upsert".
# Calling it multiple times will be idempotent.
#
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# to see the reasoning behind using `pull_request_target` instead of `pull_request`
types: [opened, reopened, ready_for_review]

jobs:
add-content-to-project:
name: "Add Content to project"
runs-on: ubuntu-latest
steps:
- name: "Set Issue to 'Priority = Triage Next'"
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
if: github.event_name == 'issues'
with:
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
organization: "hashicorp"
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
- name: "Set Pull Request to 'Priority = Triage Next'"
uses: leonsteinhaeuser/project-beta-automations@v1.2.1
if: github.event_name == 'pull_request'
with:
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
organization: "hashicorp"
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
resource_node_id: ${{ github.event.pull_request.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ typings/

# ./wrapper/dist gets included in top-level ./dist
wrapper/dist

# Jetbrains IDEs
.idea/
.iml