From d3ffed4a2d5bef12dabdd890799f427b677f6a0b Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 14 Oct 2024 17:14:26 +0200 Subject: [PATCH] Add PR health workflow --- .github/workflows/health.yaml | 14 ++++++++++++++ .github/workflows/post_summaries.yaml | 17 +++++++++++++++++ .github/workflows/publish.yaml | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 .github/workflows/health.yaml create mode 100644 .github/workflows/post_summaries.yaml diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml new file mode 100644 index 00000000..f258f8b6 --- /dev/null +++ b/.github/workflows/health.yaml @@ -0,0 +1,14 @@ +name: Health +on: + pull_request: + branches: [ main ] + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + health: + uses: dart-lang/ecosystem/.github/workflows/health.yaml@main + with: + ignore_coverage: "**.mock.dart,**.g.dart" + ignore_license: "**.mock.dart,**.g.dart,**.mocks.dart" + permissions: + pull-requests: write diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml new file mode 100644 index 00000000..f5c8be81 --- /dev/null +++ b/.github/workflows/post_summaries.yaml @@ -0,0 +1,17 @@ +name: Comment on the pull request + +on: + # Trigger this workflow after the Health workflow completes. This workflow will have permissions to + # do things like create comments on the PR, even if the original workflow couldn't. + workflow_run: + workflows: + - Publish + - Health + types: + - completed + +jobs: + upload: + uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main + permissions: + pull-requests: write diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 205a02db..52acac43 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,3 +12,6 @@ jobs: publish: if: ${{ github.repository_owner == 'dart-lang' }} uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + with: + write-comments: false +