Skip to content

🚧Refactor moq code to nsubstitute #863

🚧Refactor moq code to nsubstitute

🚧Refactor moq code to nsubstitute #863

name: ✅Sync Status Check
defaults:
run:
shell: pwsh
on:
pull_request_target:
branches: [main, preview]
jobs:
sync_status_check:
name: Sync Status Check
runs-on: ubuntu-latest
steps:
- name: Set Up Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ vars.DENO_VERSION }}
- name: Pass Workflow If Renovate
if: startsWith(github.head_ref, 'renovate/')
run: Write-Host "::notice::Renovate PR detected. Skipping sync status check.";
- name: Run Sync Status Check
if: startsWith(github.head_ref, 'feature/')
run: |
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts";
$prNumber = "${{ github.event.number }}";
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}";
Write-Host "::notice::PR Number: $prNumber";
Write-Host "::notice::Event Type: pr";
if ($manuallyExecuted -and $prNumber -eq "0") {
Write-Host "::notice::The issue or PR number must be a value greater than 0.";
exit 1;
}
<# Deno Args:
1. Organization name
2. Project name
3. Pull request number
4. Event Type - set to pull request event type
5. PAT
#>
deno run `
--allow-net --allow-read `
"$scriptUrl" `
"${{ vars.ORGANIZATION_NAME }}" `
"${{ vars.PROJECT_NAME }}" `
"$prNumber" `
"pr" `
"${{ secrets.CICD_TOKEN }}";