diff --git a/.github/actions/handle-fix-commit/action.yaml b/.github/actions/handle-fix-commit/action.yaml index 8068d820..06c23a8d 100644 --- a/.github/actions/handle-fix-commit/action.yaml +++ b/.github/actions/handle-fix-commit/action.yaml @@ -2,8 +2,8 @@ name: 'Handle Fix Commit' description: 'Commits changes if possible, otherwise creates a patch and comments on the PR.' inputs: - commit-message: - description: 'The commit message to use.' + tool: + description: 'The tool name reported in commit messages and PR comments.' required: true working-directory: description: 'The working directory for git operations.' @@ -37,7 +37,7 @@ runs: if: steps.check_changes.outputs.changes == 'false' uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 with: - message: 'No automatic fixes were necessary.' + message: 'No automatic ${{ inputs.tool }} fixes were necessary.' - name: Get PR maintainer_can_modify property id: pr-properties @@ -60,14 +60,14 @@ runs: cwd: ${{ inputs.working-directory }} author_name: "github-actions[bot]" author_email: "41898282+github-actions[bot]@users.noreply.github.com" - message: ${{ inputs.commit-message }} + message: "Apply ${{ inputs.tool }} fixes" - name: Notify of commit if: steps.add_and_commit.conclusion == 'success' && steps.add_and_commit.outputs.committed == 'true' && steps.add_and_commit.outputs.pushed == 'true' uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 with: message: | - Automatic fixes pushed (commit ${{ steps.add_and_commit.outputs.commit_sha }}). + Automatic ${{ inputs.tool }} fixes pushed (commit ${{ steps.add_and_commit.outputs.commit_sha }}). ⚠️ **Note:** Some issues may require manual review and fixing. - name: Create patch @@ -100,5 +100,5 @@ runs: ``` 3. **Commit the changes:** ```bash - git commit -am "${{ inputs.commit-message }}" + git commit -am "Apply ${{ inputs.tool }} fixes" ``` diff --git a/.github/workflows/clang-format-fix.yaml b/.github/workflows/clang-format-fix.yaml index 7a7cfc35..5c9e14d3 100644 --- a/.github/workflows/clang-format-fix.yaml +++ b/.github/workflows/clang-format-fix.yaml @@ -50,7 +50,7 @@ jobs: - name: Handle fix commit uses: ./phlex-src/.github/actions/handle-fix-commit with: - commit-message: 'Apply clang-format fixes' + tool: clang-format working-directory: phlex-src token: ${{ secrets.WORKFLOW_PAT }} pr-info-ref: ${{ needs.parse-command.outputs.ref }} diff --git a/.github/workflows/clang-tidy-fix.yaml b/.github/workflows/clang-tidy-fix.yaml index 94945293..45ea08cd 100644 --- a/.github/workflows/clang-tidy-fix.yaml +++ b/.github/workflows/clang-tidy-fix.yaml @@ -86,7 +86,7 @@ jobs: - name: Handle fix commit uses: ./phlex-src/.github/actions/handle-fix-commit with: - commit-message: 'Apply clang-tidy fixes' + tool: clang-tidy working-directory: phlex-src token: ${{ secrets.WORKFLOW_PAT }} pr-info-ref: ${{ needs.parse-command.outputs.ref }} diff --git a/.github/workflows/cmake-format-fix.yaml b/.github/workflows/cmake-format-fix.yaml index 7c7ca69f..0eeaba3b 100644 --- a/.github/workflows/cmake-format-fix.yaml +++ b/.github/workflows/cmake-format-fix.yaml @@ -53,15 +53,15 @@ jobs: run: | cd phlex-src echo "Applying CMake formatting..." - + # Find all CMake files cmake_files=$(find . -type f \( -name "CMakeLists.txt" -o -name "CMakeLists.txt.in" -o -name "*.cmake" -o -name "*.cmake.in" \) ! -path "*/build/*" ! -path "*/_deps/*") - + if [ -z "$cmake_files" ]; then echo "No CMake files found to format" exit 0 fi - + # Format each file for file in $cmake_files; do echo "Formatting $file..." @@ -71,7 +71,7 @@ jobs: - name: Handle fix commit uses: ./phlex-src/.github/actions/handle-fix-commit with: - commit-message: 'Apply cmake-format fixes' + tool: cmake-format working-directory: phlex-src token: ${{ secrets.WORKFLOW_PAT }} pr-info-ref: ${{ needs.parse-command.outputs.ref }} diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index 939e9e38..a02b3c06 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -61,7 +61,7 @@ jobs: - name: Handle fix commit uses: ./phlex-src/.github/actions/handle-fix-commit with: - commit-message: 'Apply Python linting fixes' + tool: 'Python linting' working-directory: phlex-src token: ${{ secrets.WORKFLOW_PAT }} pr-info-ref: ${{ needs.parse-command.outputs.ref }}