Skip to content

Fixed ownership permissions warning in GHA.#2358

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/fix-gha-ownership-permissions
Mar 12, 2026
Merged

Fixed ownership permissions warning in GHA.#2358
AlexSkrypnyk merged 1 commit intomainfrom
feature/fix-gha-ownership-permissions

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Mar 12, 2026

Summary by CodeRabbit

  • Chores
    • Updated continuous integration and deployment pipeline configuration to enhance build environment stability and process consistency. Improvements have been applied across all workflow stages—lint, database, build, and deployment—to ensure more reliable execution throughout the development pipeline.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Walkthrough

A new CI step named "Fix Git ownership permissions" is added to multiple jobs in the build-test-deploy workflow. This step configures Git's safe.directory setting for the workspace and runs immediately after checkout, preceding all subsequent CI processing steps.

Changes

Cohort / File(s) Summary
Git Safe Directory Configuration
.github/workflows/build-test-deploy.yml
Added "Fix Git ownership permissions" step across lint, database, build, and deploy jobs to configure Git safe.directory for the workspace after checkout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 In workflows bright where pipelines run,
Git permissions tangled, giving none,
A rabbit hops in with safe.directory's spell,
"Now trust this workspace!" the workflow does tell,
No more ownership woes—hop along, all is well! 🏃‍♂️✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fixed ownership permissions warning in GHA' directly aligns with the main change—adding a Git safe.directory configuration step to fix ownership permission warnings in GitHub Actions workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/fix-gha-ownership-permissions

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-test-deploy.yml:
- Around line 85-86: The "Fix Git ownership permissions" step is duplicated
across jobs; create a reusable composite action named "Setup Git" (action.yml)
that runs the git config --global --add safe.directory "$GITHUB_WORKSPACE"
command, commit it to the repo actions directory, then replace each duplicated
step named "Fix Git ownership permissions" in the workflow with a single uses
entry that calls the new "Setup Git" composite action so maintenance is
centralized.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cbe3200d-6b3f-4a3e-b07c-38145c91c86d

📥 Commits

Reviewing files that changed from the base of the PR and between 03cb665 and 6a6cfb9.

⛔ Files ignored due to path filters (30)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/db_download_source_acquia/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_gha/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_acquia/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_ftp/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_lagoon/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_s3/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_url/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/provision_profile/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_claro/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_olivero/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/theme_stark/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_no_theme/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_no_theme/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_none/.github/workflows/build-test-deploy.yml is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
  • .github/workflows/build-test-deploy.yml

Comment on lines +85 to +86
- name: Fix Git ownership permissions
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using a reusable action for the repeated step.

The same "Fix Git ownership permissions" step is duplicated across all four jobs. While acceptable for a simple one-liner, if more shared setup steps are needed in the future, consider creating a composite action to reduce duplication and centralize maintenance.

📝 Example composite action approach

Create .github/actions/setup-git/action.yml:

name: Setup Git
description: Configure Git safe directory for container environments
runs:
  using: composite
  steps:
    - name: Fix Git ownership permissions
      shell: bash
      run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

Then use in each job:

- uses: ./.github/actions/setup-git

Also applies to: 215-216, 339-340, 540-541

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-test-deploy.yml around lines 85 - 86, The "Fix Git
ownership permissions" step is duplicated across jobs; create a reusable
composite action named "Setup Git" (action.yml) that runs the git config
--global --add safe.directory "$GITHUB_WORKSPACE" command, commit it to the repo
actions directory, then replace each duplicated step named "Fix Git ownership
permissions" in the workflow with a single uses entry that calls the new "Setup
Git" composite action so maintenance is centralized.

@github-actions
Copy link

Code Coverage Report:
  2026-03-12 02:20:48

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 02:22:01

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 02:25:24

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk
Copy link
Member Author

Code Coverage Report:
  2026-03-12 02:25:34

 Summary:
  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (189/189)

Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.69%. Comparing base (03cb665) to head (6a6cfb9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2358      +/-   ##
==========================================
- Coverage   79.19%   78.69%   -0.50%     
==========================================
  Files         125      118       -7     
  Lines        6589     6430     -159     
  Branches       44        0      -44     
==========================================
- Hits         5218     5060     -158     
+ Misses       1371     1370       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk merged commit 0b68239 into main Mar 12, 2026
35 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/fix-gha-ownership-permissions branch March 12, 2026 02:35
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Mar 12, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.37.0 milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 1.37.0

Development

Successfully merging this pull request may close these issues.

1 participant