From d42c994913e6632cb762736e5d7cf7a343ef2a45 Mon Sep 17 00:00:00 2001 From: Fast Forward Unit Test Date: Thu, 31 Aug 2023 10:27:11 +0000 Subject: [PATCH] Initial commit --- .github/workflows/fast-forward.yml | 27 +++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 25 +++++++++++++++++++++++++ README.md | 11 +++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .github/workflows/fast-forward.yml create mode 100644 .github/workflows/pull_request.yml create mode 100644 README.md diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml new file mode 100644 index 0000000..0ffbb93 --- /dev/null +++ b/.github/workflows/fast-forward.yml @@ -0,0 +1,27 @@ +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@bf4bf49107ef535f9f0b10fdafa8326cf207c77f + 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 + diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..b59faa2 --- /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@bf4bf49107ef535f9f0b10fdafa8326cf207c77f + 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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..283c8a8 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +```text +# Commit that we are testing +GITHUB_REPOSITORY=sequoia-pgp/fast-forward +GITHUB_HEAD_REF=bf4bf49107ef535f9f0b10fdafa8326cf207c77f +# Unit test repository: +OWNER=sequoia-pgp +REPO=fast-forward-unit-tests +DEFAULT_BRANCH=fast-forward-test-014366 + +GITHUB_ACTOR=nwalfield +```