[llvm-branch-commits] [llvm] PR for llvm/llvm-project#80585 (PR #80776)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 6 15:42:48 PST 2024


https://github.com/llvmbot updated https://github.com/llvm/llvm-project/pull/80776

>From 588526bc582ab197cbb38638945564787c072b9b Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Sat, 3 Feb 2024 21:42:40 -0800
Subject: [PATCH 1/2] [workflows] Only run code formatter on the main branch
 (#80348)

Modifying a cherry-picked patch to fix code formatting issues can be
risky, so we don't typically do this. Therefore, it's not necessary to
run this job on the release branches.

(cherry picked from commit 2193c95e2459887e7e6e4f9f4aacf9252e99858f)
---
 .github/workflows/pr-code-format.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 5223089ee8a93d..c8fd541fd34db9 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -1,5 +1,8 @@
 name: "Check code formatting"
 on: pull_request_target
+  branches:
+    - main
+
 permissions:
   pull-requests: write
 

>From 6e9fd6b99e6b18650e90432dd9920de763578e42 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Sun, 4 Feb 2024 21:33:30 -0800
Subject: [PATCH 2/2] [Github] Fix triggers formatting in code format action

A recent comment modified the job to only run on the main branch, but
the formatting was slightly off, causing the job to not run. This patch
fixes the formatting so the job will run as expected.

(cherry picked from commit 4b34558f43121df9b863ff2492f74fb2e65a5af1)
---
 .github/workflows/pr-code-format.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index c8fd541fd34db9..3d0c23917bd403 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -1,7 +1,8 @@
 name: "Check code formatting"
-on: pull_request_target
-  branches:
-    - main
+on:
+  pull_request_target:
+    branches:
+      - main
 
 permissions:
   pull-requests: write



More information about the llvm-branch-commits mailing list