name: Add a build scan comment to PR
on: pull_request
jobs:
  gradle:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
      with:
        java-version: 11
    - uses: ./
    - id: gradle
      working-directory: __tests__/samples/kotlin-dsl
      run: ./gradlew help
    - name: "Comment build scan url"
      uses: actions/github-script@v3
      with:
        github-token: ${{secrets.GITHUB_TOKEN}}
        script: |
          github.issues.createComment({
            issue_number: context.issue.number,
            owner: context.repo.owner,
            repo: context.repo.repo,
            body: 'Dummy comment for PR: ${{ steps.gradle.outputs.build-scan-url }}'
          })

name: Add a build scan comment to PR
on:
  pull_request:
    types: [assigned, review_requested]
jobs:
  gradle:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
      with:
        java-version: 11
    - uses: ./
    - id: gradle
      working-directory: __tests__/samples/kotlin-dsl
      run: ./gradlew help
    - name: "Comment build scan url"
      uses: actions/github-script@v3
      with:
        github-token: ${{secrets.GITHUB_TOKEN}}
        script: |
          github.issues.createComment({
            issue_number: context.issue.number,
            owner: context.repo.owner,
            repo: context.repo.repo,
            body: 'PR ready for review: ${{ steps.gradle.outputs.build-scan-url }}'
          })

Reduce the number of automated comments left on PR
Reduce the number of automated comments left on PR
