Skip to content

Commit

Permalink
chore: clean ups after 2yrs (#1)
Browse files Browse the repository at this point in the history
* chore: clean ups after 2yrs

* fix
  • Loading branch information
pgollucci authored Nov 2, 2024
1 parent 85a43bf commit 5b8cdc0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && (github.event.pull_request.user.login == 'p6m7g8-automation')
if: |
!github.event.pull_request.draft &&
!contains(github.event.pull_request.labels.*.name, 'do-not-merge') &&
(contains(github.event.pull_request.labels.*.name, 'auto-approve') || github.event.pull_request.user.login == 'pgollucci' || github.event.pull_request.user.login == 'p6m7g8-automation')
steps:
- uses: hmarr/auto-approve-action@v2.1.0
- uses: hmarr/auto-approve-action@v4.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.P6_A_GH_TOKEN }}
38 changes: 27 additions & 11 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
queue_rules:
- name: default
commit_message_template: |-
{{ title }} (#{{ number }})
{{ body }}
merge_method: squash
pull_request_rules:
- name: Put PRs in queue (squash)
conditions:
- base = main
- "#approved-reviews-by>=1"
- -label~=(do-not-merge)
pull_request_rules:
- name: Automatic merge on approval and successful build
- status-success=build
actions:
delete_head_branch: {}
delete_head_branch:
queue:
method: squash
name: default
commit_message_template: |-
{{ title }} (#{{ number }})
{{ body }}
merge_method: squash
- name: Label core contributions
actions:
label:
add:
- contribution/core
conditions:
- "#approved-reviews-by>=1"
- -label~=(do-not-merge)
- author~=^(pgollucci)$
- label!=contribution/core
- name: Label auto-merge for core
actions:
label:
add:
- auto-merge
conditions:
- label=contribution/core
- label!=auto-merge
merge_queue:
max_parallel_checks: 1
5 changes: 1 addition & 4 deletions gh-parallel
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ p6_usage() {
cat <<EOF
Usage:
gh parallel -h
gh parallel list [<login> [-- <list options>] | -h]
gh parallel clone [<login> <dest_dir> [-- <clone options] | -h]
FUTURE commands
gh parallel clone <login> <dest_dir> [-- <clone-options>]
Options:
EOF
Expand Down Expand Up @@ -76,7 +74,6 @@ p6main() {
# security 101: only allow valid comamnds
case $cmd in
help) p6_usage ;;
list) ;;
clone) ;;
*) p6_usage 1 "invalid cmd" ;;
esac
Expand Down

0 comments on commit 5b8cdc0

Please sign in to comment.