Skip to content

Commit

Permalink
try for real
Browse files Browse the repository at this point in the history
  • Loading branch information
westin-m committed Oct 24, 2024
1 parent 940fa37 commit be398b8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 44 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/PR_comment.yml
Original file line number Diff line number Diff line change
@@ -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
})
# with:
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: process.env.COMMENT_CONTENT
# })
39 changes: 18 additions & 21 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit be398b8

Please sign in to comment.