Skip to content

Conversation

@vbvictor
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Oct 24, 2025

@llvm/pr-subscribers-github-workflow

Author: Baranov Victor (vbvictor)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/165052.diff

3 Files Affected:

  • (modified) .github/workflows/pr-code-format.yml (-8)
  • (modified) .github/workflows/pr-code-lint.yml (-5)
  • (modified) llvm/utils/git/code-format-helper.py (+3-3)
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 2b85d8b59869c..ac0689b4d3243 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -25,14 +25,6 @@ jobs:
         with:
           fetch-depth: 2
 
-      # We need to set the repo checkout as safe, otherwise tj-actions/changed-files
-      # will fail due to the changed ownership inside the container.
-      # TODO(boomanaiden154): We should probably fix this by having the default user
-      # in the container have the same ID as the GHA user on the host.
-      - name: Set Safe Directory
-        run: |
-          chown -R root $(pwd)
-
       - name: Get changed files
         id: changed-files
         uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
diff --git a/.github/workflows/pr-code-lint.yml b/.github/workflows/pr-code-lint.yml
index e67b518149c2c..8ba9378703739 100644
--- a/.github/workflows/pr-code-lint.yml
+++ b/.github/workflows/pr-code-lint.yml
@@ -31,11 +31,6 @@ jobs:
         with:
           fetch-depth: 2
       
-      # FIXME: same as in ".github/workflows/pr-code-format.yml"
-      - name: Set Safe Directory
-        run: |
-          chown -R root $(pwd)
-      
       - name: Get changed files
         id: changed-files
         uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 406a72817acb8..46eff86c0fbbe 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -282,9 +282,9 @@ class DarkerFormatHelper(FormatHelper):
 
     def _construct_command(self, diff_expression: str | None) -> str:
         darker_cmd = [
-            self.darker_fmt_path,
-            "--check",
-            "--diff",
+        self.darker_fmt_path,
+        "--check",
+        "--diff",
         ]
         if diff_expression:
             darker_cmd += ["-r", diff_expression]

This reverts commit 8f76f75.
@github-actions
Copy link

github-actions bot commented Oct 24, 2025

✅ With the latest revision this PR passed the Python code formatter.

@vbvictor vbvictor merged commit e68cf1e into llvm:main Oct 24, 2025
13 checks passed
@vbvictor vbvictor deleted the pr/vbvictor/5420367049848181 branch October 24, 2025 22:57
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants