diff --git a/.github/workflows/softfix.yaml b/.github/workflows/softfix.yaml index 5dd0ab52..aad07662 100644 --- a/.github/workflows/softfix.yaml +++ b/.github/workflows/softfix.yaml @@ -1,18 +1,21 @@ -name: Softfix workflow +name: autosquash workflow on: issue_comment: types: [created] jobs: - softfix: + autosquash: name: Softfix action - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/softfix') + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/squashcommits') runs-on: ubuntu-latest steps: - name: Checkout the latest code uses: actions/checkout@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 # otherwise, you will fail to push refs to dest repo - - uses: dekvall/softfix@v1.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 # otherwise, you will fail to push refs to dest repo + - uses: theoremlp/autosquash@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + pull-request-number: ${{ github.event.pull_request.number }} + squash-commit-title: "${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})" + squash-commit-message: "${{ github.event.pull_request.body }}"