Skip to content

Commit b51b103

Browse files
committed
Remove unused workflows and merge into contrib
1 parent 6b3744a commit b51b103

File tree

4 files changed

+40
-62
lines changed

4 files changed

+40
-62
lines changed

.github/workflows/cla.yaml

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

.github/workflows/pr.yaml renamed to .github/workflows/contrib.yaml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
name: Pull Request
1+
name: contrib
22

33
on:
4+
issue_comment:
5+
types: [created]
46
pull_request_target:
57
types:
8+
- opened
9+
- closed
10+
- synchronize
611
- labeled
712
- unlabeled
813
- opened
@@ -13,11 +18,41 @@ on:
1318
concurrency: pr-${{ github.ref }}
1419

1520
jobs:
16-
lint-title:
17-
name: Lint title
21+
# Dependabot is annoying, but this makes it a bit less so.
22+
auto-approve:
23+
runs-on: ubuntu-latest
24+
if: github.event_name == 'pull_request_target'
25+
permissions:
26+
pull-requests: write
27+
steps:
28+
- uses: hmarr/auto-approve-action@v3
29+
if: github.actor == 'dependabot[bot]'
30+
31+
cla:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: cla
35+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
36+
uses: contributor-assistant/github-action@v2.2.1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
# the below token should have repo scope and must be manually added by you in the repository's secret
40+
PERSONAL_ACCESS_TOKEN: ${{ secrets.CDRCOMMUNITY_GITHUB_TOKEN }}
41+
with:
42+
remote-organization-name: "coder"
43+
remote-repository-name: "cla"
44+
path-to-signatures: "v2022-09-04/signatures.json"
45+
path-to-document: "https://github.com/coder/cla/blob/main/README.md"
46+
# branch should not be protected
47+
branch: "main"
48+
allowlist: dependabot*
49+
50+
title:
1851
runs-on: ubuntu-latest
52+
if: github.event_name == 'pull_request_target'
1953
steps:
20-
- uses: amannn/action-semantic-pull-request@v5
54+
- name: Validate PR title
55+
uses: amannn/action-semantic-pull-request@v5
2156
env:
2257
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2358
with:
@@ -29,7 +64,7 @@ jobs:
2964
# Depend on lint so that title is Conventional Commits-compatible.
3065
needs: [lint-title]
3166
# Skip tagging for draft PRs.
32-
if: ${{ success() && !github.event.pull_request.draft }}
67+
if: ${{ github.event_name == 'pull_request_target' && success() && !github.event.pull_request.draft }}
3368
steps:
3469
- uses: actions/github-script@v6
3570
with:

.github/workflows/dependabot.yaml

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

.github/workflows/welcome.yaml

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

0 commit comments

Comments
 (0)