Skip to content

Commit ebae8dd

Browse files
committed
Migrate most GitHub HashiBot behaviors to GitHub Actions
GitHub HashiBot is being deprecated and this replaces behaviors with equivalent workflows in GitHub Actions. The `pull_request_size_labeler` behavior will be handled one an upstream enhancement is merged (or if we decide to use a fork with the change).
1 parent e95cdf2 commit ebae8dd

File tree

6 files changed

+52
-18
lines changed

6 files changed

+52
-18
lines changed

.github/labeler-issue-triage.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bug:
2+
- 'panic:'
3+
crash:
4+
- 'panic:'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- .github/dependabot.yml
3+
- go.mod
4+
- go.sum
5+
documentation:
6+
- website/**/*
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue Comment Created Triage
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
issue_comment_triage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-ecosystem/action-remove-labels@v1
12+
with:
13+
labels: |
14+
stale
15+
waiting-reply

.github/workflows/issue-opened.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue Opened Triage
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
issue_triage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: github/issue-labeler@v2
13+
with:
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
15+
configuration-path: .github/labeler-issue-triage.yml

.github/workflows/pull-request.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "Pull Request Triage"
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
triage:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/labeler@v3
10+
with:
11+
configuration-path: .github/labeler-pull-request-triage.yml
12+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.hashibot.hcl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
behavior "regexp_issue_labeler" "panic_label" {
2-
regexp = "panic:"
3-
labels = ["crash", "bug"]
4-
}
5-
6-
behavior "remove_labels_on_reply" "remove_stale" {
7-
labels = ["waiting-response", "stale"]
8-
only_non_maintainers = true
9-
}
10-
111
behavior "pull_request_size_labeler" "size" {
122
label_prefix = "size/"
133
label_map = {
@@ -37,11 +27,3 @@ behavior "pull_request_size_labeler" "size" {
3727
}
3828
}
3929
}
40-
41-
behavior "pull_request_path_labeler" "cross_provider_labels" {
42-
label_map = {
43-
"documentation" = ["website/**/*"]
44-
"dependencies" = ["vendor/**/*"]
45-
}
46-
}
47-

0 commit comments

Comments
 (0)