-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.53 KB
/
combine-dependabot-prs.yml
File metadata and controls
51 lines (44 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Adapted version of https://github.com/hrvey/combine-prs-workflow
# https://github.com/hrvey/combine-prs-workflow/blob/master/LICENSE
name: 'Combine Dependabot Pull Requests'
on:
workflow_dispatch:
inputs:
combineBranchName:
description: 'Name of the branch to combine pull requests into'
required: true
default: 'combined-dependabot-prs'
ignoreLabel:
description: 'Exclude pull requests with this label'
required: true
default: 'no-combine'
permissions:
checks: read
contents: write
pull-requests: write
jobs:
combine-prs:
name: Combine pull requests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github/workflows/scripts/combine-dependabot-prs.js
sparse-checkout-cone-mode: false
- uses: actions/github-script@v9
id: create-combined-pr
name: Create combined pull request
env:
COMBINE_BRANCH_NAME: ${{ github.event.inputs.combineBranchName }}
IGNORE_LABEL: ${{ github.event.inputs.ignoreLabel }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { COMBINE_BRANCH_NAME, IGNORE_LABEL } = process.env
const inputs = {
combineBranchName: COMBINE_BRANCH_NAME,
ignoreLabel: IGNORE_LABEL
};
const script = require('./.github/workflows/scripts/combine-dependabot-prs.js')
await script({github, context, core}, inputs)