From 03c56e66de3c731037743f7e097193b49d6dfaca Mon Sep 17 00:00:00 2001 From: Quentin Burg Date: Thu, 25 Jan 2024 14:45:48 +0100 Subject: [PATCH 1/3] :alembic: test fast-forward github action --- .github/workflows/fast-forward.yml | 26 ++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/fast-forward.yml create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml new file mode 100644 index 0000000..3b147d8 --- /dev/null +++ b/.github/workflows/fast-forward.yml @@ -0,0 +1,26 @@ +name: fast-forward +on: + issue_comment: + types: [created, edited] +jobs: + fast-forward: + # Only run if the comment contains the /fast-forward command. + if: ${{ contains(github.event.comment.body, '/fast-forward') + && github.event.issue.pull_request }} + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + issues: write + + steps: + - name: Fast forwarding + uses: sequoia-pgp/fast-forward@v1 + with: + merge: true + # To reduce the workflow's verbosity, use 'on-error' + # to only post a comment when an error occurs, or 'never' to + # never post a comment. (In all cases the information is + # still available in the step's summary.) + comment: always \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..715bf3e --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,25 @@ +name: pull-request +on: + pull_request: + types: [opened, reopened, synchronize] +jobs: + check-fast-forward: + runs-on: ubuntu-latest + + permissions: + contents: read + # We appear to need write permission for both pull-requests and + # issues in order to post a comment to a pull request. + pull-requests: write + issues: write + + steps: + - name: Checking if fast forwarding is possible + uses: sequoia-pgp/fast-forward@v1 + with: + merge: false + # To reduce the workflow's verbosity, use 'on-error' + # to only post a comment when an error occurs, or 'never' to + # never post a comment. (In all cases the information is + # still available in the step's summary.) + comment: always \ No newline at end of file From 9806d3f0d180c9667fbe37517c52760b9640735b Mon Sep 17 00:00:00 2001 From: Quentin Burg Date: Thu, 25 Jan 2024 15:00:58 +0100 Subject: [PATCH 2/3] :bug: fix github action yml --- .github/workflows/fast-forward.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml index 3b147d8..6bd06aa 100644 --- a/.github/workflows/fast-forward.yml +++ b/.github/workflows/fast-forward.yml @@ -5,8 +5,8 @@ on: jobs: fast-forward: # Only run if the comment contains the /fast-forward command. - if: ${{ contains(github.event.comment.body, '/fast-forward') - && github.event.issue.pull_request }} + if: contains(github.event.comment.body, '/fast-forward') + && github.event.issue.pull_request runs-on: ubuntu-latest permissions: @@ -23,4 +23,4 @@ jobs: # to only post a comment when an error occurs, or 'never' to # never post a comment. (In all cases the information is # still available in the step's summary.) - comment: always \ No newline at end of file + comment: always From d5a72c47f42c5485e4fceeb19fb8f8df530d40f2 Mon Sep 17 00:00:00 2001 From: Quentin Burg Date: Thu, 25 Jan 2024 15:37:47 +0100 Subject: [PATCH 3/3] :alembic: --- .github/workflows/fast-forward.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml index 6bd06aa..53c4563 100644 --- a/.github/workflows/fast-forward.yml +++ b/.github/workflows/fast-forward.yml @@ -5,8 +5,7 @@ on: jobs: fast-forward: # Only run if the comment contains the /fast-forward command. - if: contains(github.event.comment.body, '/fast-forward') - && github.event.issue.pull_request + if: github.event.comment.body == '/fast-forward' && github.event.issue.pull_request runs-on: ubuntu-latest permissions: