Skip to content

Commit e8296fb

Browse files
authored
Sync github (#10)
1 parent 3062c72 commit e8296fb

18 files changed

+488
-196
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Use this file to define individuals or teams that are responsible for code in a repository.
22
# Read more: <https://help.github.com/articles/about-codeowners/>
33
#
4-
# Order is important: the last matching pattern takes the most precedence
4+
# Order is important: the last matching pattern has the highest precedence
55

66
# These owners will be the default owners for everything
77
* @cloudposse/engineering @cloudposse/contributors
@@ -13,5 +13,13 @@
1313
# Cloud Posse must review any changes to GitHub actions
1414
.github/* @cloudposse/engineering
1515

16-
# Cloud Posse must review any changes to standard context definition
17-
**/context.tf @cloudposse/engineering
16+
# Cloud Posse must review any changes to standard context definition,
17+
# but some changes can be rubber-stamped.
18+
**/*.tf @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
19+
README.yaml @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
20+
README.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
21+
docs/*.md @cloudposse/engineering @cloudposse/contributors @cloudposse/approvers
22+
23+
# Cloud Posse Admins must review all changes to CODEOWNERS or the mergify configuration
24+
.github/mergify.yml @cloudposse/admins
25+
.github/CODEOWNERS @cloudposse/admins
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Bug report
3+
description: Create a report to help us improve
4+
labels: ["bug"]
5+
assignees: [""]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Found a bug?
11+
12+
Please checkout our [Slack Community](https://slack.cloudposse.com)
13+
or visit our [Slack Archive](https://archive.sweetops.com/).
14+
15+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
16+
17+
- type: textarea
18+
id: concise-description
19+
attributes:
20+
label: Describe the Bug
21+
description: A clear and concise description of what the bug is.
22+
placeholder: What is the bug about?
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected Behavior
30+
description: A clear and concise description of what you expected.
31+
placeholder: What happened?
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: reproduction-steps
37+
attributes:
38+
label: Steps to Reproduce
39+
description: Steps to reproduce the behavior.
40+
placeholder: How do we reproduce it?
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: screenshots
46+
attributes:
47+
label: Screenshots
48+
description: If applicable, add screenshots or logs to help explain.
49+
validations:
50+
required: false
51+
52+
- type: textarea
53+
id: environment
54+
attributes:
55+
label: Environment
56+
description: Anything that will help us triage the bug.
57+
placeholder: |
58+
- OS: [e.g. Linux, OSX, WSL, etc]
59+
- Version [e.g. 10.15]
60+
- Module version
61+
- Terraform version
62+
validations:
63+
required: false
64+
65+
- type: textarea
66+
id: additional
67+
attributes:
68+
label: Additional Context
69+
description: |
70+
Add any other context about the problem here.
71+
validations:
72+
required: false
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: Feature Request
3+
description: Suggest an idea for this project
4+
labels: ["feature request"]
5+
assignees: [""]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Have a question?
11+
12+
Please checkout our [Slack Community](https://slack.cloudposse.com)
13+
or visit our [Slack Archive](https://archive.sweetops.com/).
14+
15+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
16+
17+
- type: textarea
18+
id: concise-description
19+
attributes:
20+
label: Describe the Feature
21+
description: A clear and concise description of what the feature is.
22+
placeholder: What is the feature about?
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: expected
28+
attributes:
29+
label: Expected Behavior
30+
description: A clear and concise description of what you expected.
31+
placeholder: What happened?
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: use-case
37+
attributes:
38+
label: Use Case
39+
description: |
40+
Is your feature request related to a problem/challenge you are trying
41+
to solve?
42+
43+
Please provide some additional context of why this feature or
44+
capability will be valuable.
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: ideal-solution
50+
attributes:
51+
label: Describe Ideal Solution
52+
description: A clear and concise description of what you want to happen.
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
id: alternatives-considered
58+
attributes:
59+
label: Alternatives Considered
60+
description: Explain alternative solutions or features considered.
61+
validations:
62+
required: false
63+
64+
- type: textarea
65+
id: additional
66+
attributes:
67+
label: Additional Context
68+
description: |
69+
Add any other context about the problem here.
70+
validations:
71+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
## what
2-
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
3-
* Use bullet points to be concise and to the point.
2+
3+
<!--
4+
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
5+
- Use bullet points to be concise and to the point.
6+
-->
47

58
## why
6-
* Provide the justifications for the changes (e.g. business case).
7-
* Describe why these changes were made (e.g. why do these commits fix the problem?)
8-
* Use bullet points to be concise and to the point.
9+
10+
<!--
11+
- Provide the justifications for the changes (e.g. business case).
12+
- Describe why these changes were made (e.g. why do these commits fix the problem?)
13+
- Use bullet points to be concise and to the point.
14+
-->
915

1016
## references
11-
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
12-
* Use `closes #123`, if this PR closes a GitHub issue `#123`
1317

18+
<!--
19+
- Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
20+
- Use `closes #123`, if this PR closes a GitHub issue `#123`
21+
-->

.github/auto-release.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,36 @@ version-template: '$MAJOR.$MINOR.$PATCH'
44
version-resolver:
55
major:
66
labels:
7-
- 'major'
7+
- 'major'
88
minor:
99
labels:
10-
- 'minor'
11-
- 'enhancement'
10+
- 'minor'
11+
- 'enhancement'
1212
patch:
1313
labels:
14-
- 'patch'
15-
- 'fix'
16-
- 'bugfix'
17-
- 'bug'
18-
- 'hotfix'
14+
- 'auto-update'
15+
- 'patch'
16+
- 'fix'
17+
- 'bugfix'
18+
- 'bug'
19+
- 'hotfix'
1920
default: 'minor'
21+
filter-by-commitish: true
2022

2123
categories:
22-
- title: '🚀 Enhancements'
23-
labels:
24-
- 'enhancement'
25-
- title: '🐛 Bug Fixes'
26-
labels:
27-
- 'fix'
28-
- 'bugfix'
29-
- 'bug'
30-
- 'hotfix'
24+
- title: '🚀 Enhancements'
25+
labels:
26+
- 'enhancement'
27+
- 'patch'
28+
- title: '🐛 Bug Fixes'
29+
labels:
30+
- 'fix'
31+
- 'bugfix'
32+
- 'bug'
33+
- 'hotfix'
34+
- title: '🤖 Automatic Updates'
35+
labels:
36+
- 'auto-update'
3137

3238
change-template: |
3339
<details>
@@ -38,3 +44,11 @@ change-template: |
3844
3945
template: |
4046
$CHANGES
47+
48+
replacers:
49+
# Remove irrelevant information from Renovate bot
50+
- search: '/(?<=---\s)\s*^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
51+
replace: ''
52+
# Remove Renovate bot banner image
53+
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
54+
replace: ''

.github/mergify.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# https://docs.mergify.io/conditions.html
2+
# https://docs.mergify.io/actions.html
3+
pull_request_rules:
4+
- name: "approve automated PRs that have passed checks"
5+
conditions:
6+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
7+
- "-closed"
8+
- "head~=^(auto-update|renovate)/.*"
9+
- "check-success=test/bats"
10+
- "check-success=test/readme"
11+
- "check-success=test/terratest"
12+
- "check-success=validate-codeowners"
13+
- or:
14+
- "base=master"
15+
- "base=main"
16+
- "base~=^release/v\\d{1,2}$"
17+
18+
actions:
19+
review:
20+
type: "APPROVE"
21+
bot_account: "cloudposse-mergebot"
22+
message: "We've automatically approved this PR because the checks from the automated Pull Request have passed."
23+
24+
- name: "merge automated PRs when approved and tests pass"
25+
conditions:
26+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
27+
- "-closed"
28+
- "head~=^(auto-update|renovate)/.*"
29+
- "check-success=test/bats"
30+
- "check-success=test/readme"
31+
- "check-success=test/terratest"
32+
- "check-success=validate-codeowners"
33+
- "#approved-reviews-by>=1"
34+
- "#changes-requested-reviews-by=0"
35+
- "#commented-reviews-by=0"
36+
- or:
37+
- "base=master"
38+
- "base=main"
39+
- "base~=^release/v\\d{1,2}$"
40+
41+
actions:
42+
merge:
43+
method: "squash"
44+
45+
- name: "delete the head branch after merge"
46+
conditions:
47+
- "merged"
48+
actions:
49+
delete_head_branch: {}
50+
51+
- name: "ask to resolve conflict"
52+
conditions:
53+
- "conflict"
54+
- "-closed"
55+
actions:
56+
comment:
57+
message: "This pull request is now in conflict. Could you fix it @{{author}}? 🙏"
58+
59+
- name: "remove outdated reviews"
60+
conditions:
61+
- or:
62+
- "base=master"
63+
- "base=main"
64+
- "base~=^release/v\\d{1,2}$"
65+
actions:
66+
dismiss_reviews:
67+
changes_requested: true
68+
approved: true
69+
message: "This Pull Request has been updated, so we're dismissing all reviews."
70+
71+
- name: "close Pull Requests without files changed"
72+
conditions:
73+
- "#files=0"
74+
actions:
75+
close:
76+
message: "This pull request has been automatically closed by Mergify because there are no longer any changes."

.github/renovate.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges"
5+
],
6+
"baseBranches": ["main", "master", "/^release\\/v\\d{1,2}$/"],
7+
"labels": ["auto-update"],
8+
"dependencyDashboardAutoclose": true,
9+
"enabledManagers": ["terraform"],
10+
"terraform": {
11+
"ignorePaths": ["**/context.tf", "examples/**"]
12+
}
13+
}

.github/workflows/auto-release.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)