Skip to content

Change docs structure v3.0 (#3722) #7183

Change docs structure v3.0 (#3722)

Change docs structure v3.0 (#3722) #7183

name: Alias reminder
on:
pull_request_target:
branches: [ main ]
types: [ labeled, synchronize ]
jobs:
alias_reminder:
name: Check for moved files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0
- name: Check for moved files
shell: pwsh
id: check_files_moved
run: |
$diff = git diff -M --find-renames=10 --summary ${{github.event.pull_request.base.sha}}
$SourceDiff = $diff | Where-Object { $_ -match 'rename.*.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_files_moved.outputs.files_moved == 'True'
uses: marocchino/[email protected]
with:
recreate: true
message: |
It looks like the following files may have been renamed. Please ensure you set all needed aliases:
${{ steps.check_files_moved.outputs.files }}
GITHUB_TOKEN: ${{ secrets.PR_TOKEN }}