Skip to content

Commit 0f8b7ee

Browse files
authored
Improve stylua github workflow (nvim-lua#571)
Addressing issue nvim-lua#570 This improves the github workflow to no longer require manual approval for PRs from first time contributors. Changes the github event from pull_request to pull_request_target and adds an explicit PR head checkout
1 parent 9da5f21 commit 0f8b7ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/stylua.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Check Lua Formatting
22
name: Check Lua Formatting
3-
on: pull_request
3+
on: pull_request_target
44

55
jobs:
66
stylua-check:
@@ -9,6 +9,8 @@ jobs:
99
steps:
1010
- name: Checkout Code
1111
uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.event.pull_request.head.sha }}
1214
- name: Stylua Check
1315
uses: JohnnyMorganz/stylua-action@v3
1416
with:

0 commit comments

Comments
 (0)