Skip to content

Commit

Permalink
Merge branch 'main' into test-flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Sep 16, 2023
2 parents e9e1c49 + a32fb14 commit 09b1cf0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/alias-reminder.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Alias reminder

on:
pull_request:
types: [opened, synchronize]
pull_request_target:
branches: [ main ]
types: [ labeled, synchronize ]

jobs:
alias-reminder:
alias_reminder:
name: Check for moved files
runs-on: ubuntu-latest
steps:
Expand All @@ -17,18 +18,17 @@ jobs:
- name: Check for moved files
shell: pwsh
id: check_files_moved
outputs:
docs_changed: ${{ steps.check_files_moved.outputs.files_moved }}
run: |
$diff = git diff -M --find-renames=10 --summary main
$SourceDiff = $diff | Where-Object { $_ -match '.md$' }
$diff = git diff -M --find-renames=10 --summary ${{github.event.pull_request.base.sha}}
$SourceDiff = $diff | Where-Object { $_ -match '.md.*$' }
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "::set-output name=files_moved::$HasDiff"
Write-Host "::set-output name=files::$SourceDiff"
- name: Comment on PR with changed files
if: steps.check_file_changed.outputs.files_moved == 'True'
if: steps.check_files_moved.outputs.files_moved == 'True'
uses: marocchino/[email protected]
with:
recreate: true
message: 'It looks like the following files were renamed. Please ensure you set aliases correctly:\n $(git diff -M --find-renames=10 --summary main | grep md)'
message: 'It looks like the following files were renamed. Please ensure you set aliases correctly:\n ${{ steps.check_files_moved.outputs.files }}'
GITHUB_TOKEN: ${{ secrets.PR_TOKEN }}

0 comments on commit 09b1cf0

Please sign in to comment.