Skip to content

Refactor workflows#107

Merged
PhantomDave merged 9 commits intomainfrom
refactor-workflows
Nov 25, 2025
Merged

Refactor workflows#107
PhantomDave merged 9 commits intomainfrom
refactor-workflows

Conversation

@PhantomDave
Copy link
Copy Markdown
Owner

No description provided.

@PhantomDave PhantomDave marked this pull request as ready for review November 25, 2025 09:45
Copilot AI review requested due to automatic review settings November 25, 2025 09:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the GitHub Actions workflow architecture by introducing a centralized PR orchestration pattern. The main change consolidates pull request triggers from individual workflows into a new pr-checks.yml file that uses path filtering to conditionally execute specific workflows via workflow_call.

Key changes:

  • Introduced centralized pr-checks.yml to orchestrate all PR checks with path-based filtering
  • Removed duplicate pull_request triggers from individual workflows, replacing them with workflow_call and workflow_dispatch triggers
  • Standardized workflow formatting (2-space indentation, double quotes for strings)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.github/workflows/pr-checks.yml New centralized PR orchestration workflow with path filtering, job coordination, and dependabot/crowdin auto-merge logic
.github/workflows/pr-filter.yml New filter configuration defining which file paths trigger which jobs (tests, frontend, backend components)
.github/workflows/tests.yml Removed pull_request trigger; now called via workflow_call from pr-checks.yml
.github/workflows/frontend.yml Removed pull_request trigger; added workflow_call and workflow_dispatch triggers
.github/workflows/codeql-analysis.yml Removed pull_request trigger; added workflow_call; standardized quote style
.github/workflows/build-frontend-image.yml Removed pull_request trigger to avoid duplicate builds on PRs
.github/workflows/build-backend-image.yml Removed pull_request trigger to avoid duplicate builds on PRs
.github/workflows/backend-library.yml Removed pull_request trigger; added workflow_call; standardized formatting (2-space indentation, double quotes)
.github/workflows/backend-data.yml Removed pull_request trigger; added workflow_call; standardized formatting (2-space indentation, double quotes)
.github/workflows/backend-api.yml Removed pull_request trigger; added workflow_call and workflow_dispatch; standardized formatting (2-space indentation, double quotes)

Comment thread .github/workflows/pr-checks.yml Outdated
Comment thread .github/workflows/pr-checks.yml Outdated
Comment thread .github/workflows/pr-checks.yml Outdated
Comment thread .github/pr-filter.yml
Comment thread .github/workflows/pr-checks.yml
Comment thread .github/workflows/pr-checks.yml
Comment thread .github/pr-filter.yml
Comment thread .github/workflows/pr-checks.yml
@PhantomDave PhantomDave requested a review from Copilot November 25, 2025 09:56
@PhantomDave PhantomDave merged commit ff8e64b into main Nov 25, 2025
11 checks passed
@PhantomDave PhantomDave deleted the refactor-workflows branch November 25, 2025 09:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

backend:
permissions:
contents: write
if: ${{ needs.changes.outputs.backend == 'true'}}
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent spacing in the expression - there's an extra space after the opening {{. For consistency with the other job conditions (lines 43, 50, 66, 74), use ${{ needs.changes.outputs.backend == 'true'}}.

Suggested change
if: ${{ needs.changes.outputs.backend == 'true'}}
if: ${{ needs.changes.outputs.backend == 'true' }}

Copilot uses AI. Check for mistakes.
- "PhantomDave.BankTracking.Library/**"
- "PhantomDave.BankTracking.sln"
- ".github/workflows/backend-library.yml"
workflow_call:
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the other backend workflows (backend-api.yml has both workflow_dispatch and workflow_call), consider adding workflow_dispatch: here to allow manual triggering of this workflow.

Suggested change
workflow_call:
workflow_call:
workflow_dispatch:

Copilot uses AI. Check for mistakes.
- "PhantomDave.BankTracking.Library/**"
- "PhantomDave.BankTracking.sln"
- ".github/workflows/backend-data.yml"
workflow_call:
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the other backend workflows (backend-api.yml has both workflow_dispatch and workflow_call), consider adding workflow_dispatch: here to allow manual triggering of this workflow.

Suggested change
workflow_call:
workflow_call:
workflow_dispatch:

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
.github/actions
terraform/environments.json
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sparse-checkout configuration includes paths that don't exist in the repository (.github/actions and terraform/environments.json). This will cause the checkout to fail or behave unexpectedly. Remove these non-existent paths from the sparse-checkout list.

Suggested change
.github/actions
terraform/environments.json

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +99
needs: # list all the required jobs here!
- changes
- frontend
- backend
- backend-library
- backend-data
- codeql
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests job is missing from the needs list of the completed job. This means the completion check won't wait for tests to finish, potentially allowing PRs to pass even if tests fail. Add - tests to the needs list.

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +29
filters: |
.github/pr-filter.yml
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filters parameter should reference the file path where the filter definitions are located, not a literal string with the file path. Change this to:

filters: .github/pr-filter.yml

Without the pipe character, this tells the action to read the filter definitions from that file.

Suggested change
filters: |
.github/pr-filter.yml
filters: .github/pr-filter.yml

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants