diff --git a/.github/workflows/learning-room-pr-bot.yml b/.github/workflows/learning-room-pr-bot.yml index de7c5d05..c3fcc606 100644 --- a/.github/workflows/learning-room-pr-bot.yml +++ b/.github/workflows/learning-room-pr-bot.yml @@ -26,7 +26,7 @@ jobs: if: github.event_name == 'issues' && github.event.action == 'opened' steps: - name: Greet First Issue - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | try { @@ -73,7 +73,7 @@ jobs: steps: - name: Check if first-time contributor - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | try { @@ -163,7 +163,7 @@ jobs: - name: Post validation results if: always() - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const fs = require('fs'); @@ -250,7 +250,7 @@ jobs: - name: Set status check if: always() - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const fs = require('fs'); @@ -282,7 +282,7 @@ jobs: steps: - name: Congratulate reviewer - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const reviewBody = [ @@ -311,8 +311,11 @@ jobs: if: github.event_name == 'issue_comment' steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Auto-respond to keywords - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const { getAutoResponse } = require('./.github/scripts/comment-responder.js'); diff --git a/learning-room/.github/workflows/pr-validation-bot.yml b/learning-room/.github/workflows/pr-validation-bot.yml index 33653d00..f8d23589 100644 --- a/learning-room/.github/workflows/pr-validation-bot.yml +++ b/learning-room/.github/workflows/pr-validation-bot.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Check if first-time contributor - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | try { @@ -138,7 +138,7 @@ jobs: - name: Detect challenge context id: challenge - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | // Detect which challenge this PR relates to from linked issues or branch name @@ -172,7 +172,7 @@ jobs: - name: Post validation results if: always() - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const fs = require('fs'); @@ -288,7 +288,7 @@ jobs: fi - name: Respond to comment - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const { getAutoResponse } = require('./.github/scripts/comment-responder.js'); diff --git a/scripts/classroom/Reset-SupportHubEnvironment.ps1 b/scripts/classroom/Reset-SupportHubEnvironment.ps1 index 77963fa9..bf69c3f6 100644 --- a/scripts/classroom/Reset-SupportHubEnvironment.ps1 +++ b/scripts/classroom/Reset-SupportHubEnvironment.ps1 @@ -148,30 +148,31 @@ contact_links: "@ [IO.File]::WriteAllText((Join-Path $clonePath '.github/ISSUE_TEMPLATE/config.yml'), $issueConfig, [Text.UTF8Encoding]::new($false)) - $firstResponse = @" -name: First Response Assistant - -on: - issues: - types: [opened] - -permissions: - issues: write - -jobs: - first-response: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: `Thanks for opening this request. A maintainer will review it within 24 to 48 hours.` - }); -"@ + $firstResponse = @( + 'name: First Response Assistant' + '' + 'on:' + ' issues:' + ' types: [opened]' + '' + 'permissions:' + ' issues: write' + '' + 'jobs:' + ' first-response:' + ' runs-on: ubuntu-latest' + ' steps:' + ' - uses: actions/github-script@v8' + ' with:' + ' script: |' + ' await github.rest.issues.createComment({' + ' owner: context.repo.owner,' + ' repo: context.repo.repo,' + ' issue_number: context.issue.number,' + " body: 'Thanks for opening this request. A maintainer will review it within 24 to 48 hours.'" + ' });' + '' + ) -join "`n" [IO.File]::WriteAllText((Join-Path $clonePath '.github/workflows/first-response.yml'), $firstResponse, [Text.UTF8Encoding]::new($false)) Invoke-CheckedCommand git @('config', 'user.name', 'accesswatch')