Skip to content

Migrating events from SharePoint to TinaCMS #5469

Migrating events from SharePoint to TinaCMS

Migrating events from SharePoint to TinaCMS #5469

Workflow file for this run

name: PR - Lint PR
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ci-${{ github.event.number }}
cancel-in-progress: true
defaults:
run:
shell: pwsh
jobs:
pr-lint:
runs-on: ubuntu-latest
name: Check linked issues
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Checking non-content changes - 🔎
shell: pwsh
id: check_file_changed
run: |
# Diff HEAD with the previous commit
$diff = git diff --name-only HEAD^ HEAD
$diff = $diff -replace '["'']', '' #Clean-up for the file paths of the newsletter's images.(i.e double & single quotes)
# TODO: Next time we need to modify which directories we ignore, break this out to a variable which is easy to configure
$SourceDiff = $diff | Where-Object { $_ -notmatch '^content/' -and $_ -notmatch '^public/' -and $_ -notmatch '^.github/ISSUE_TEMPLATE/' }
$HasDiff = $SourceDiff.Length -gt 0
echo "hasCodeChanges=$HasDiff" >> $env:GITHUB_OUTPUT
echo "sourceDiff=$SourceDiff" >> $env:GITHUB_OUTPUT
- name: Non-content files - 📂
run: |
# Source Difference
if ( ([string]::IsNullOrEmpty("${{ steps.check_file_changed.outputs.sourceDiff }}"))) {
echo "🏃 content change only - skipping lint action"
}
else {
echo "${{ steps.check_file_changed.outputs.sourceDiff }}"
}
- uses: nearform-actions/github-action-check-linked-issues@v1.6.3
if: ${{steps.check_file_changed.outputs.hasCodeChanges == 'True' }}
id: check-linked-issues
with:
exclude-branches: "dependabot/**"
- name: Generate summary
run: |
echo "Found ${{ steps.check-linked-issues.outputs.linked_issues_count }} issues linked to PR" >> $GITHUB_STEP_SUMMARY