Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
e33543c7
Unverified
Commit
e33543c7
authored
Apr 17, 2024
by
Lucas Saavedra Vaz
Committed by
GitHub
Apr 17, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(pre-commit): Enforce that the pre-commit checks are run before merge (#9525)
Fix
parent
66c96dd3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
.github/workflows/pre-commit-status.yml
.github/workflows/pre-commit-status.yml
+41
-0
.github/workflows/pre-commit.yml
.github/workflows/pre-commit.yml
+3
-3
No files found.
.github/workflows/pre-commit-status.yml
0 → 100644
View file @
e33543c7
name
:
Report Pre-commit Check Status
on
:
pull_request_target
:
types
:
[
opened
,
reopened
,
synchronize
,
labeled
,
unlabeled
]
permissions
:
statuses
:
write
jobs
:
report-run
:
name
:
Check if the PR has run the pre-commit checks
runs-on
:
ubuntu-latest
steps
:
-
name
:
Report pending
uses
:
conda/actions/set-commit-status@v24.2.0
with
:
context
:
"
Pre-commit
checks"
state
:
pending
description
:
The pre-commit checks need to be successful before merging
-
name
:
Wait for pre-commit checks to complete
uses
:
lucasssvaz/wait-on-workflow@v1
if
:
|
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge')
id
:
wait-on-workflow
with
:
timeout
:
10
interval
:
30
workflow
:
pre-commit.yml
sha
:
${{ github.event.pull_request.head.sha || github.sha }}
-
name
:
Report success
uses
:
conda/actions/set-commit-status@v24.2.0
if
:
|
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') &&
steps.wait-on-workflow.outputs.conclusion == 'success'
with
:
context
:
"
Pre-commit
checks"
state
:
success
description
:
All pre-commit checks passed
.github/workflows/pre-commit.yml
View file @
e33543c7
name
:
Pre-commit
check
name
:
Pre-commit
hooks
on
:
on
:
pull_request
:
pull_request
:
types
:
[
opened
,
reopened
,
synchronize
,
labeled
]
types
:
[
opened
,
reopened
,
synchronize
,
labeled
,
unlabeled
]
jobs
:
jobs
:
lint
:
lint
:
if
:
|
if
:
|
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge')
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge')
name
:
Check
ing if any
fixes are needed
name
:
Check
if
fixes are needed
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
name
:
Checkout latest commit
-
name
:
Checkout latest commit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment