Skip to content
Closed

Asdf #38

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/mg.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Check Diff
on:
- pull_request
- merge_group

pull_request:
merge_group:
push:
workflow_dispatch:
jobs:
pr-lint:
checkdiff:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -19,9 +20,15 @@ jobs:

$base_ref = "${{ github.base_ref }}";
$github_ref = "${{ github.ref }}";

$github_basesha = "${{ github.event.pull_request.base.sha }}";
$mg_headRef = "${{ github.event.merge_group.head_ref }}"
$mg_baseRef = "${{ github.event.merge_group.base_sha }}"
if($base_ref){
$ref = "origin/${{ github.base_ref }}"
} elseif($github_basesha){
$ref = $github_basesha
} elseif($mg_baseRef){
$ref = $mg_baseRef
}elseif($github_ref){
$ref = $github_ref
}else{
Expand All @@ -35,4 +42,4 @@ jobs:
$HasDiff = $SourceDiff.Length -gt 0

echo "main_changed=$HasDiff" >> $env:GITHUB_OUTPUT
echo "main_changed=$HasDiff"
echo "main_changed=$HasDiff"
2 changes: 1 addition & 1 deletion sub/asdf.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test file
asdf
3 changes: 3 additions & 0 deletions sub/test2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
should also notice
sdfdf
sdfsdf
Loading