diff --git a/.github/workflows/PR_comment.yml b/.github/workflows/PR_comment.yml index 35bf360fd..1b23f73c8 100644 --- a/.github/workflows/PR_comment.yml +++ b/.github/workflows/PR_comment.yml @@ -1,24 +1,24 @@ -on: pull_request -permissions: write-all -jobs: - example_comment_pr: - runs-on: windows-latest - name: An example job to comment a PR - steps: - - name: Set comment content - shell: bash - run: | - echo "Hello! Thanks for opening this PR." > data.txt - echo "COMMENT_CONTENT=$(cat data.txt)" >> $GITHUB_ENV - - name: Comment PR - uses: actions/github-script@v7 - id: comment +# on: pull_request +# permissions: write-all +# jobs: +# example_comment_pr: +# runs-on: windows-latest +# name: An example job to comment a PR +# steps: +# - name: Set comment content +# shell: bash +# run: | +# echo "Hello! Thanks for opening this PR." > data.txt +# echo "COMMENT_CONTENT=$(cat data.txt)" >> $GITHUB_ENV +# - name: Comment PR +# uses: actions/github-script@v7 +# id: comment - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: process.env.COMMENT_CONTENT - }) \ No newline at end of file +# with: +# script: | +# github.rest.issues.createComment({ +# issue_number: context.issue.number, +# owner: context.repo.owner, +# repo: context.repo.repo, +# body: process.env.COMMENT_CONTENT +# }) \ No newline at end of file diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index cafddbe92..b518b56a4 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -66,27 +66,24 @@ jobs: shell: bash run: cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - # - name: Set comment content - # shell: bash - # run: | - # echo "FILE1_OUTPUT << EOF" >> $GITHUB_OUTPUT - # echo "$(cat CodeCoverage/SummaryGithub.md)" >> $GITHUB_OUTPUT - # echo "EOF" >> $GITHUB_OUTPUT - # # run: | - # # cat CodeCoverage/SummaryGithub.md >> $COMMENT_CONTENT - # # echo "COMMENT_CONTENT=$COMMENT_CONTENT" >> $GITHUB_ENV - - # - name: Comment PR - # uses: actions/github-script@v7 - # id: comment - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: `${{ steps.set_comment_content.outputs.FILE1_OUTPUT }}` - # }) + - name: Set comment content + shell: bash + run: echo "COMMENT_CONTENT = $(cat CodeCoverage/SummaryGithub.md)" >> $GITHUB_ENV + # run: | + # cat CodeCoverage/SummaryGithub.md >> $COMMENT_CONTENT + # echo "COMMENT_CONTENT=$COMMENT_CONTENT" >> $GITHUB_ENV + + - name: Comment PR + uses: actions/github-script@v7 + id: comment + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: process.env.COMMENT_CONTENT + }) - name: Test with .NET 7.0.x run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net7.0 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)&(FullyQualifiedName!~TokenAcquirerTests)"