[llvm] [GitHub] Run format job on stacked PRs (PR #102957)

Tobias Stadler via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 12:09:30 PDT 2024


https://github.com/tobias-stadler created https://github.com/llvm/llvm-project/pull/102957

Currently the formatter only runs on the main branch, which prevents the formatter from running for stacked PRs, which have to target user branches instead of main.

Disclaimer: I have never touched GH actions before and I don't know if this is correct, but this seemed like a simple fix. If this is completely wrong, feel free to close and I can file an issue instead.

>From 3481340951c2e5bc895ff019cd6d018eaed4458b Mon Sep 17 00:00:00 2001
From: Tobias Stadler <mail at stadler-tobias.de>
Date: Mon, 12 Aug 2024 20:52:55 +0200
Subject: [PATCH] [GitHub] Run format job on stacked PRs

Currently the formatter only runs on the main branch, which prevents the
formatter from running for stacked PRs, which have to target user
branches instead of main.

Disclaimer: I have never touched GH actions before and I don't know if
this is correct, but this seemed like a simple fix. If this is
completely wrong, feel free to close and I can file an issue instead.
---
 .github/workflows/pr-code-format.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 22357e5d99e4c..6b588f19e307b 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -7,6 +7,7 @@ on:
   pull_request:
     branches:
       - main
+      - 'users/**'
 
 jobs:
   code_formatter:



More information about the llvm-commits mailing list