Skip to content

Commit

Permalink
Update PR Health install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Aug 14, 2024
1 parent 2719d0c commit 839bc35
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ name: Health
# coverage_web: false
# upload_coverage: false
# use-flutter: true
# use-flutter: true
# use-flutter: true
# ignore_license: "**.g.dart"
# ignore_coverage: "**.mock.dart,**.g.dart"
# ignore_packages: "pkgs/helper_package"
Expand Down
42 changes: 39 additions & 3 deletions pkgs/firehose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ containing several packages).

### Integrating this tool into a repo

- copy the yaml below into a `.github/workflows/health.yaml` file in your repo
- update the target branch below if necessary (currently, `main`)
1. Copy the yaml below into a `.github/workflows/health.yaml` file in your repo
2. Update the target branch below if necessary (currently, `main`)

```yaml
name: Health
Expand All @@ -186,9 +186,45 @@ jobs:
health:
uses: dart-lang/ecosystem/.github/workflows/health.yaml@main
# with:
# checks: "version,changelog,license,coverage"
# sdk: beta
# checks: "version,changelog,license,coverage,breaking,do-not-submit,leaking"
# fail_on: "version,changelog,do-not-submit"
# warn_on: "license,coverage,breaking,leaking"
# coverage_web: false
# upload_coverage: false
# use-flutter: true
# ignore_license: "**.g.dart"
# ignore_coverage: "**.mock.dart,**.g.dart"
# ignore_packages: "pkgs/helper_package"
# checkout_submodules: false
# experiments: "native-assets"
permissions:
pull-requests: write
```

3. Copy the yaml below into a `.github/workflows/post_summaries.yaml` file in your repo. This is a [necessary](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) workaround to get PR Health comments on PRs from forks.

```yaml
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:
- Health
# - Publish
types:
- completed
jobs:
upload:
uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main
permissions:
pull-requests: write
```


### Options

| Name | Type | Description | Example |
Expand Down

0 comments on commit 839bc35

Please sign in to comment.