Skip to content

Commit

Permalink
Update PR Health install instructions (#286)
Browse files Browse the repository at this point in the history
As per the comments in dart-lang/test#2266.

Thanks @jakemac53 !

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Most changes should add an entry to the changelog and may need to [rev
the pubspec package
version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change).
- Changes to packages require [corresponding
tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing).

Note that many Dart repos have a weekly cadence for reviewing PRs -
please allow for some latency before initial review feedback.
</details>
  • Loading branch information
mosuem committed Aug 14, 2024
1 parent 03bf029 commit de7883c
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 de7883c

Please sign in to comment.