From 5b8cdc0cda4952f5c01157a076901979b6a59b08 Mon Sep 17 00:00:00 2001 From: "Philip M. Gollucci" Date: Sat, 2 Nov 2024 08:26:12 -0500 Subject: [PATCH] chore: clean ups after 2yrs (#1) * chore: clean ups after 2yrs * fix --- .github/workflows/auto-approve.yml | 9 ++++--- .mergify.yml | 38 +++++++++++++++++++++--------- gh-parallel | 5 +--- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index a7ec578..f4f3dee 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -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 }} diff --git a/.mergify.yml b/.mergify.yml index c58cbe0..b09b64a 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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 diff --git a/gh-parallel b/gh-parallel index 091f5bd..d49a633 100755 --- a/gh-parallel +++ b/gh-parallel @@ -34,9 +34,7 @@ p6_usage() { cat < [-- ] | -h] - gh parallel clone [ [-- [-- ] Options: EOF @@ -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