From 5a419319aa9cb1f6a5b2d3ae4fff886986994564 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Fri, 21 Nov 2025 15:51:58 -0600 Subject: [PATCH 1/7] Add Python linting and formatting workflows --- .flake8 | 3 - .github/workflows/python-check.yaml | 112 ++++++++++++++++++++++++++++ .github/workflows/python-fix.yaml | 92 +++++++++++++++++++++++ pyproject.toml | 34 +++++++++ 4 files changed, 238 insertions(+), 3 deletions(-) delete mode 100644 .flake8 create mode 100644 .github/workflows/python-check.yaml create mode 100644 .github/workflows/python-fix.yaml create mode 100644 pyproject.toml diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 16598a700..000000000 --- a/.flake8 +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -max-line-length = 99 -ignore = E731,E203 diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml new file mode 100644 index 000000000..33b2e8b0f --- /dev/null +++ b/.github/workflows/python-check.yaml @@ -0,0 +1,112 @@ +name: Python Check +run-name: "${{ github.actor }} checking Python code" + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + detect-python-changes: + runs-on: ubuntu-latest + permissions: + contents: read + + outputs: + has_changes: ${{ steps.filter.outputs.matched }} + changed_files: ${{ steps.filter.outputs.matched_files }} + is_act: ${{ steps.detect_act.outputs.is_act }} + + steps: + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + with: + fetch-depth: 0 + path: phlex-src + + - name: Detect act environment + id: detect_act + uses: ./phlex-src/.github/actions/detect-act-env + + - name: Detect Python changes + id: filter + uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main + with: + repo-path: phlex-src + base-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} + head-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + file-type: python + + - name: Report detection outcome + run: | + if [ "${{ steps.filter.outputs.matched }}" != "true" ]; then + echo "::notice::No python check relevant changes detected; workflow will be skipped." + else + echo "::group::Python check relevant files" + printf '%s\n' "${{ steps.filter.outputs.matched_files }}" + echo "::endgroup::" + fi + + python-check: + needs: detect-python-changes + if: ${{ (needs.detect-python-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (needs.detect-python-changes.outputs.is_act == 'true') }} + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + with: + path: phlex-src + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: '3.x' + + - name: Install Python dependencies + run: | + pip install ruff mypy + + - name: Run ruff and mypy checks + working-directory: phlex-src + env: + FORCE_COLOR: 1 # `ruff`/`colored` crate + run: | + failed=0 + + echo "➡️ Checking Python code with ruff..." + echo "::group::Running ruff check" + if ! ruff check; then + failed=1 + echo "::endgroup::" + echo "❌ Ruff check failed." + else + echo "::endgroup::" + echo "✅ Ruff check passed." + fi + + echo "➡️ Checking Python code with mypy..." + echo "::group::Running mypy" + if ! mypy --color-output .; then + failed=1 + echo "::endgroup::" + echo "❌ MyPy check failed." + else + echo "::endgroup::" + echo "✅ MyPy check passed." + fi + + exit $failed + + python-check-skipped: + needs: detect-python-changes + if: ${{ (needs.detect-python-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (needs.detect-python-changes.outputs.is_act != 'true') }} + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: No relevant Python changes detected + run: echo "No Python relevant changes detected; check skipped." diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml new file mode 100644 index 000000000..ba482d9e6 --- /dev/null +++ b/.github/workflows/python-fix.yaml @@ -0,0 +1,92 @@ +name: Python Fix +run-name: "${{ github.actor }} fixing Python code" + +on: + issue_comment: + types: + - created + +permissions: + pull-requests: write + contents: write + +jobs: + parse-command: + runs-on: ubuntu-latest + name: Parse bot command + if: ${{ github.event.issue.pull_request }} + outputs: + should_run: ${{ steps.check_comment.outputs.should_run }} + ref: ${{ steps.get_pr.outputs.ref }} + sha: ${{ steps.get_pr.outputs.sha }} + repo: ${{ steps.get_pr.outputs.repo }} + + steps: + - id: check_comment + name: Check comment for trigger phrase + run: | + if [[ "${{ github.event.comment.author_association }}" == "COLLABORATOR" || "${{ github.event.comment.author_association }}" == "OWNER" ]] && \ + [[ $(echo "${{ github.event.comment.body }}" | grep -qEe '^@phlexbot[[:space:]]+python-fix\b' && echo 'true') ]]; then + echo "should_run=true" >> $GITHUB_OUTPUT + else + echo "should_run=false" >> $GITHUB_OUTPUT + fi + - name: Get PR Info + if: steps.check_comment.outputs.should_run == 'true' + id: get_pr + uses: ./actions/get-pr-info + + apply_fixes: + runs-on: ubuntu-latest + name: Apply fixes + needs: parse-command + if: ${{ needs.parse-command.outputs.should_run == 'true' }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + with: + path: phlex-src + ref: ${{ needs.parse-command.outputs.ref }} + repository: ${{ needs.parse-command.outputs.repo }} + token: ${{ secrets.WORKFLOW_PAT }} + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: '3.x' + + - name: Install Python dependencies + run: | + pip install ruff + + - name: Run ruff format and fix + working-directory: phlex-src + env: + FORCE_COLOR: 1 + run: | + echo "Fixing Python format with ruff" + ruff format . || true + echo "Fixing Python linter issues with ruff" + ruff --fix . || true + + - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 + id: add_and_commit + with: + token: ${{ secrets.WORKFLOW_PAT }} + cwd: phlex-src + author_name: "github-actions[bot]" + author_email: "41898282+github-actions[bot]@users.noreply.github.com" + message: 'Committing Python linting fixes' + + - name: Formatting changes committed and pushed + if: ${{ steps.add_and_commit.outputs.committed == 'true' && steps.add_and_commit.outputs.pushed == 'true'}} + uses: thollander/actions-comment-pull-request@b937ab2052c93d9343a059d00921a97a950882e3 # v3.0.1 + with: + message: | + Python linting fixes pushed (commit ${{ steps.add_and_commit.outputs.commit_sha }}) + + - name: No formatting changes to make + if: ${{ steps.add_and_commit.outputs.committed == 'false' }} + uses: thollander/actions-comment-pull-request@b937ab2052c93d9343a059d00921a97a950882e3 # v3.0.1 + with: + message: | + No Python linting fixes to make diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..9357828e5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[tool.mypy] +ignore_missing_imports = true +no_implicit_optional = true +plugins = [ +] +show_error_codes = true +warn_unreachable = true +disable_error_code = "annotation-unchecked" + +[tool.ruff] +target-version = "py310" +line-length = 99 + +[tool.ruff.lint] +select = [ + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "D", # pydocstyle + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "W", # pycodestyle warnings +] +ignore = [] +extend-ignore = [ + "E731", # do not assign a lambda expression, use a def + "E203", # whitespace before ':' +] + +[tool.ruff.lint.pydocstyle] +convention = "google" + +[tool.ruff.format] +quote-style = "double" From 105b50e49a48138d0a78ef30874da6119064e2a3 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Mon, 24 Nov 2025 20:34:06 -0600 Subject: [PATCH 2/7] Fix commented action pinning --- .github/workflows/python-check.yaml | 6 +++--- .github/workflows/python-fix.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index 33b2e8b0f..4e4b473d2 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: fetch-depth: 0 path: phlex-src @@ -56,12 +56,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: path: phlex-src - name: Set up Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: python-version: '3.x' diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index ba482d9e6..e0ca1d1ae 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -42,7 +42,7 @@ jobs: needs: parse-command if: ${{ needs.parse-command.outputs.should_run == 'true' }} steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: path: phlex-src ref: ${{ needs.parse-command.outputs.ref }} @@ -50,7 +50,7 @@ jobs: token: ${{ secrets.WORKFLOW_PAT }} - name: Set up Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: python-version: '3.x' @@ -79,14 +79,14 @@ jobs: - name: Formatting changes committed and pushed if: ${{ steps.add_and_commit.outputs.committed == 'true' && steps.add_and_commit.outputs.pushed == 'true'}} - uses: thollander/actions-comment-pull-request@b937ab2052c93d9343a059d00921a97a950882e3 # v3.0.1 + uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 with: message: | Python linting fixes pushed (commit ${{ steps.add_and_commit.outputs.commit_sha }}) - name: No formatting changes to make if: ${{ steps.add_and_commit.outputs.committed == 'false' }} - uses: thollander/actions-comment-pull-request@b937ab2052c93d9343a059d00921a97a950882e3 # v3.0.1 + uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 with: message: | No Python linting fixes to make From 5c912a9e91d62ff5f62da89da4497f0e2f20985d Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 25 Nov 2025 14:18:23 -0600 Subject: [PATCH 3/7] Logging consistency --- .github/workflows/python-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index 4e4b473d2..cb01b2843 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -81,7 +81,7 @@ jobs: if ! ruff check; then failed=1 echo "::endgroup::" - echo "❌ Ruff check failed." + echo "::error:: Ruff check failed." else echo "::endgroup::" echo "✅ Ruff check passed." @@ -92,7 +92,7 @@ jobs: if ! mypy --color-output .; then failed=1 echo "::endgroup::" - echo "❌ MyPy check failed." + echo "::error:: MyPy check failed." else echo "::endgroup::" echo "✅ MyPy check passed." From 865f4883f49d1eea4d3c9ae106ab9ec8cfea5eea Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 25 Nov 2025 14:19:05 -0600 Subject: [PATCH 4/7] Fix AI thinko --- .github/workflows/python-fix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index e0ca1d1ae..bc8c1a6fd 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -66,7 +66,7 @@ jobs: echo "Fixing Python format with ruff" ruff format . || true echo "Fixing Python linter issues with ruff" - ruff --fix . || true + ruff check --fix . || true - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 id: add_and_commit From 2c4e90afe44fb4784ec3492c69f915e0eaf5e726 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 21:44:00 +0000 Subject: [PATCH 5/7] refactor(workflows): Align Python workflows with Clang conventions Refactors the `python-check.yaml` and `python-fix.yaml` GitHub Actions workflows to align with the structure and conventions of their Clang counterparts. - In `python-check.yaml`, introduces a `pre-check` job to separate environment detection, improving the workflow's dependency graph and clarity. - In `python-fix.yaml`, enhances the issue comment trigger by moving the validation logic directly into the job's `if` condition. This is more efficient and secure, preventing the job from starting unnecessarily. - Standardizes the pinning of third-party actions to commit SHAs and local actions to the `main` branch across both workflows. --- .github/workflows/python-check.yaml | 47 +++++++++++++++++++---------- .github/workflows/python-fix.yaml | 19 +++--------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index cb01b2843..4a1753688 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -1,22 +1,34 @@ name: Python Check run-name: "${{ github.actor }} checking Python code" +permissions: + contents: read + pull-requests: read + on: pull_request: - branches: [ main ] + branches: [ main, develop ] workflow_dispatch: jobs: - detect-python-changes: + pre-check: + runs-on: ubuntu-latest + outputs: + is_act: ${{ steps.detect_act.outputs.is_act }} + steps: + - name: Detect act environment + id: detect_act + uses: ./.github/actions/detect-act-env@main + + detect-changes: + needs: pre-check + if: github.event_name != 'workflow_dispatch' && needs.pre-check.outputs.is_act != 'true' runs-on: ubuntu-latest permissions: contents: read - + packages: read outputs: has_changes: ${{ steps.filter.outputs.matched }} - changed_files: ${{ steps.filter.outputs.matched_files }} - is_act: ${{ steps.detect_act.outputs.is_act }} - steps: - name: Checkout code uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -24,13 +36,9 @@ jobs: fetch-depth: 0 path: phlex-src - - name: Detect act environment - id: detect_act - uses: ./phlex-src/.github/actions/detect-act-env - - name: Detect Python changes id: filter - uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main + uses: ./.github/actions/detect-relevant-changes@main with: repo-path: phlex-src base-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} @@ -40,7 +48,7 @@ jobs: - name: Report detection outcome run: | if [ "${{ steps.filter.outputs.matched }}" != "true" ]; then - echo "::notice::No python check relevant changes detected; workflow will be skipped." + echo "::notice::No python check relevant changes detected; job will be skipped." else echo "::group::Python check relevant files" printf '%s\n' "${{ steps.filter.outputs.matched_files }}" @@ -48,8 +56,11 @@ jobs: fi python-check: - needs: detect-python-changes - if: ${{ (needs.detect-python-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (needs.detect-python-changes.outputs.is_act == 'true') }} + needs: [pre-check, detect-changes] + if: > + github.event_name == 'workflow_dispatch' || + needs.pre-check.outputs.is_act == 'true' || + (needs.detect-changes.result == 'success' && needs.detect-changes.outputs.has_changes == 'true') runs-on: ubuntu-latest permissions: contents: read @@ -101,8 +112,12 @@ jobs: exit $failed python-check-skipped: - needs: detect-python-changes - if: ${{ (needs.detect-python-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (needs.detect-python-changes.outputs.is_act != 'true') }} + needs: [pre-check, detect-changes] + if: > + github.event_name != 'workflow_dispatch' && + needs.pre-check.outputs.is_act != 'true' && + needs.detect-changes.result == 'success' && + needs.detect-changes.outputs.has_changes != 'true' runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index bc8c1a6fd..0e53fa92e 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -14,33 +14,24 @@ jobs: parse-command: runs-on: ubuntu-latest name: Parse bot command - if: ${{ github.event.issue.pull_request }} + if: | + github.event.issue.pull_request && + (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER') && + startsWith(github.event.comment.body, '@phlexbot python-fix') outputs: - should_run: ${{ steps.check_comment.outputs.should_run }} ref: ${{ steps.get_pr.outputs.ref }} sha: ${{ steps.get_pr.outputs.sha }} repo: ${{ steps.get_pr.outputs.repo }} steps: - - id: check_comment - name: Check comment for trigger phrase - run: | - if [[ "${{ github.event.comment.author_association }}" == "COLLABORATOR" || "${{ github.event.comment.author_association }}" == "OWNER" ]] && \ - [[ $(echo "${{ github.event.comment.body }}" | grep -qEe '^@phlexbot[[:space:]]+python-fix\b' && echo 'true') ]]; then - echo "should_run=true" >> $GITHUB_OUTPUT - else - echo "should_run=false" >> $GITHUB_OUTPUT - fi - name: Get PR Info - if: steps.check_comment.outputs.should_run == 'true' id: get_pr - uses: ./actions/get-pr-info + uses: ./.github/actions/get-pr-info@main apply_fixes: runs-on: ubuntu-latest name: Apply fixes needs: parse-command - if: ${{ needs.parse-command.outputs.should_run == 'true' }} steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: From 34c4f14179be1eb737aa5e78a6f9cf43fda1655a Mon Sep 17 00:00:00 2001 From: Chris Green Date: Tue, 25 Nov 2025 15:49:42 -0600 Subject: [PATCH 6/7] Fix regression in reusable action invocation --- .github/workflows/python-check.yaml | 4 ++-- .github/workflows/python-fix.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index 4a1753688..5108008b9 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: Detect act environment id: detect_act - uses: ./.github/actions/detect-act-env@main + uses: Framework-R-D/phlex/.github/actions/detect-act-env@main@main detect-changes: needs: pre-check @@ -38,7 +38,7 @@ jobs: - name: Detect Python changes id: filter - uses: ./.github/actions/detect-relevant-changes@main + uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main@main with: repo-path: phlex-src base-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index 0e53fa92e..1b1e9c627 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -26,7 +26,7 @@ jobs: steps: - name: Get PR Info id: get_pr - uses: ./.github/actions/get-pr-info@main + uses: Framework-R-D/phlex/.github/actions/get-pr-info@main@main apply_fixes: runs-on: ubuntu-latest From b70c295554f820d843c6653650e9b976c7988db5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:54:57 +0000 Subject: [PATCH 7/7] refactor: Align Python workflows with repository standards This commit aligns the `python-check.yaml` and `python-fix.yaml` workflows with the consistency improvements and standards established in PR #135. Key changes include: - Refactoring `python-fix.yaml` to use a single-job design, moving the trigger logic into a job-level `if` condition. - Correcting the `uses` syntax for internal reusable actions to use the full repository path and pin to `@main`, resolving a syntax error (`@main@main`). --- .github/workflows/python-check.yaml | 4 ++-- .github/workflows/python-fix.yaml | 20 +++++--------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index 5108008b9..f8fecd2f1 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: Detect act environment id: detect_act - uses: Framework-R-D/phlex/.github/actions/detect-act-env@main@main + uses: Framework-R-D/phlex/.github/actions/detect-act-env@main detect-changes: needs: pre-check @@ -38,7 +38,7 @@ jobs: - name: Detect Python changes id: filter - uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main@main + uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main with: repo-path: phlex-src base-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} diff --git a/.github/workflows/python-fix.yaml b/.github/workflows/python-fix.yaml index 1b1e9c627..d7f1e6ff1 100644 --- a/.github/workflows/python-fix.yaml +++ b/.github/workflows/python-fix.yaml @@ -11,33 +11,23 @@ permissions: contents: write jobs: - parse-command: + apply_fixes: runs-on: ubuntu-latest - name: Parse bot command + name: Apply fixes if: | github.event.issue.pull_request && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '@phlexbot python-fix') - outputs: - ref: ${{ steps.get_pr.outputs.ref }} - sha: ${{ steps.get_pr.outputs.sha }} - repo: ${{ steps.get_pr.outputs.repo }} - steps: - name: Get PR Info id: get_pr - uses: Framework-R-D/phlex/.github/actions/get-pr-info@main@main + uses: Framework-R-D/phlex/.github/actions/get-pr-info@main - apply_fixes: - runs-on: ubuntu-latest - name: Apply fixes - needs: parse-command - steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: path: phlex-src - ref: ${{ needs.parse-command.outputs.ref }} - repository: ${{ needs.parse-command.outputs.repo }} + ref: ${{ steps.get_pr.outputs.ref }} + repository: ${{ steps.get_pr.outputs.repo }} token: ${{ secrets.WORKFLOW_PAT }} - name: Set up Python