-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add tools to handle PR approvals (#567)
Add tools to help maintainers control and approve PRs: - automatically approve dependabot PRs; - add a tool to help maintainers control random PRs that deserve more attention than can be offered now. Signed-off-by: Claudio André <[email protected]>
- Loading branch information
1 parent
0b7dc28
commit 0359b7d
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2024 Claudio André <[email protected]> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
# GitHub Action to approve bot PRs | ||
# More info at https://github.com/openwall/john-packages | ||
|
||
--- | ||
name: Approve PR | ||
|
||
"on": | ||
pull_request_target: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
auto-approve: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
|
||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 | ||
with: | ||
review-message: "LGTM! :+1:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
############################################################################### | ||
# _ _ _ _ _____ _ | ||
# | | | | | | | | | __ \(_) | ||
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | ||
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | ||
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | ||
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | ||
# | | | | | ||
# |_| |_| | ||
# | ||
# Copyright (c) 2024 Claudio André <[email protected]> | ||
# | ||
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, as expressed in version 2, seen at | ||
# http://www.gnu.org/licenses/gpl-2.0.html | ||
############################################################################### | ||
# GitHub Action to approve PRs | ||
# More info at https://github.com/openwall/john-packages | ||
|
||
--- | ||
name: Approve PR | ||
|
||
"on": | ||
workflow_dispatch: | ||
inputs: | ||
pullRequestNumber: | ||
description: Pull request number | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
auto-approve: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 | ||
with: | ||
pull-request-number: ${{ github.event.inputs.pullRequestNumber }} | ||
review-message: "Auto approved PR" |