File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Copyright 2025 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # https://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+ # Remove bloat from Dependabot's PR messages
17+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
19+ name : Dependabot PR trimmer
20+ run-name : Filter message body of PR #
21+
22+ on :
23+ pull_request :
24+ types : [opened]
25+ workflow_dispatch :
26+ inputs :
27+ pr-number :
28+ description : ' The PR number of the PR to edit:'
29+ type : string
30+ required : true
31+
32+ jobs :
33+ setup :
34+ runs-on : ubuntu-24.04
35+ timeout-minutes : 5
36+ steps :
37+ - if : >-
38+ github.event.pull_request.user.login == 'dependabot[bot]' ||
39+ github.event_name == 'workflow_dispatch'
40+ env:
41+ pr-number: ${{inputs.pr-number || github.event.pull_request.number}}
42+ run: |
43+ gh pr view ${{env.pr-number}} --json body --jq .body |\
44+ sed '/(dependabot-automerge-end)/,/<\/details>/d' |\
45+ gh pr edit ${{env.pr-number}} --body-file -
You can’t perform that action at this time.
0 commit comments