Skip to content

Commit 2f7b594

Browse files
authored
Merge branch 'main' into dependabot/bundler/ruby/bundler-c700c4fcbe
2 parents 312bf69 + 3f50fb2 commit 2f7b594

5 files changed

Lines changed: 114 additions & 12 deletions
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Approve Dependabot pull requests and enable auto-merge so GitHub merges them once
2+
# required status checks pass. Enable "Allow auto-merge" under Settings → General →
3+
# Pull Requests, and require status checks on the default branch. See:
4+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
5+
6+
name: Dependabot auto-approve and merge
7+
8+
on:
9+
pull_request:
10+
types: [opened, reopened, synchronize]
11+
12+
permissions:
13+
contents: write
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
dependabot:
19+
runs-on: ubuntu-latest
20+
if: github.event.pull_request.user.login == 'dependabot[bot]'
21+
steps:
22+
- name: Dependabot metadata
23+
id: metadata
24+
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
25+
with:
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Approve pull request
29+
run: |
30+
set -euo pipefail
31+
if [ "$(gh pr view "${PR_NUMBER}" --json reviewDecision -q .reviewDecision)" != "APPROVED" ]; then
32+
gh pr review --approve "${PR_NUMBER}"
33+
fi
34+
env:
35+
PR_NUMBER: ${{ github.event.pull_request.number }}
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Enable auto-merge
39+
run: |
40+
set -euo pipefail
41+
if [ "$(gh pr view "${PR_NUMBER}" --json autoMergeRequest -q '.autoMergeRequest != null')" != "true" ]; then
42+
gh pr merge --auto --merge "${PR_NUMBER}"
43+
fi
44+
env:
45+
PR_NUMBER: ${{ github.event.pull_request.number }}
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/proxy_integration_tests_javascript.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ name: Proxy integration tests (JavaScript)
77

88
on:
99
pull_request:
10-
paths:
11-
- "javascript/**"
12-
- ".github/workflows/proxy_integration_tests_javascript.yml"
1310

1411
permissions:
1512
contents: read
13+
pull-requests: read
1614

1715
jobs:
16+
changes:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
relevant: ${{ steps.filter.outputs.relevant }}
20+
steps:
21+
- name: Detect JavaScript changes
22+
id: filter
23+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
24+
with:
25+
filters: |
26+
relevant:
27+
- "javascript/**"
28+
- ".github/workflows/proxy_integration_tests_javascript.yml"
29+
1830
integration:
31+
needs: changes
32+
if: needs.changes.outputs.relevant == 'true'
1933
runs-on: ubuntu-latest
2034

2135
steps:

.github/workflows/proxy_integration_tests_php.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ name: Proxy integration tests (PHP)
77

88
on:
99
pull_request:
10-
paths:
11-
- "php/**"
12-
- ".github/workflows/proxy_integration_tests_php.yml"
1310

1411
permissions:
1512
contents: read
13+
pull-requests: read
1614

1715
jobs:
16+
changes:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
relevant: ${{ steps.filter.outputs.relevant }}
20+
steps:
21+
- name: Detect PHP changes
22+
id: filter
23+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
24+
with:
25+
filters: |
26+
relevant:
27+
- "php/**"
28+
- ".github/workflows/proxy_integration_tests_php.yml"
29+
1830
integration:
31+
needs: changes
32+
if: needs.changes.outputs.relevant == 'true'
1933
runs-on: ubuntu-latest
2034

2135
steps:

.github/workflows/proxy_integration_tests_python.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ name: Proxy integration tests (Python)
77

88
on:
99
pull_request:
10-
paths:
11-
- "python/**"
12-
- ".github/workflows/proxy_integration_tests_python.yml"
1310

1411
permissions:
1512
contents: read
13+
pull-requests: read
1614

1715
jobs:
16+
changes:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
relevant: ${{ steps.filter.outputs.relevant }}
20+
steps:
21+
- name: Detect Python changes
22+
id: filter
23+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
24+
with:
25+
filters: |
26+
relevant:
27+
- "python/**"
28+
- ".github/workflows/proxy_integration_tests_python.yml"
29+
1830
integration:
31+
needs: changes
32+
if: needs.changes.outputs.relevant == 'true'
1933
runs-on: ubuntu-latest
2034

2135
steps:

.github/workflows/proxy_integration_tests_ruby.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ name: Proxy integration tests (Ruby)
77

88
on:
99
pull_request:
10-
paths:
11-
- "ruby/**"
12-
- ".github/workflows/proxy_integration_tests_ruby.yml"
1310

1411
permissions:
1512
contents: read
13+
pull-requests: read
1614

1715
jobs:
16+
changes:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
relevant: ${{ steps.filter.outputs.relevant }}
20+
steps:
21+
- name: Detect Ruby changes
22+
id: filter
23+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
24+
with:
25+
filters: |
26+
relevant:
27+
- "ruby/**"
28+
- ".github/workflows/proxy_integration_tests_ruby.yml"
29+
1830
integration:
31+
needs: changes
32+
if: needs.changes.outputs.relevant == 'true'
1933
runs-on: ubuntu-latest
2034

2135
steps:

0 commit comments

Comments
 (0)