From eefd19070abf5b46ab6721dad5a9f2c01ff53e8d Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:49:04 -0400 Subject: [PATCH] Remove format action Version out of date and unused --- .github/workflows/format.yml | 47 ------------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 0abe612bc..000000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Format -on: - issue_comment: - types: [created] -jobs: - edit: - name: clang-format - if: ${{ github.event.comment.body == 'format this please' }} - runs-on: ubuntu-20.04 - env: - CLANG_FORMAT: clang-format - steps: - - name: Check if message comes from a PR - uses: octokit/request-action@v2.x - id: issue_info - with: - route: GET /repos/:repository/issues/:pull_number - repository: ${{ github.repository }} - pull_number: ${{ github.event.issue.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get PR info - if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} - uses: octokit/request-action@v2.x - id: pr_info - with: - route: GET /repos/:repository/pulls/:pull_number - repository: ${{ github.repository }} - pull_number: ${{ github.event.issue.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Checkout head branch from PR - if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} - uses: actions/checkout@master - with: - repository: ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }} - ref: ${{ fromJSON(steps.pr_info.outputs.data).head.ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run clang-format - if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} - run: find . -type f -regex ".*\.\(c\|h\|cc\|cpp\|hpp\)" -print0 | xargs -0 ${CLANG_FORMAT} -i -style=file - - name: Commit and push - if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} - run: | - git config --global user.name "GitHub Action" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add -u - git commit -m "Format code using $(${CLANG_FORMAT} --version)" || true - git push