fix(firehose): update existing publishing PR comments when no packages are ready to publish (#449) ## Rationale When a PR initially has a publishable version (e.g. `4.0.1-dev`) and firehose posts the `Package publishing` comment, but subsequently updates the package to a `-wip` version (e.g. `4.0.1-wip`), `VerificationResults.hasSuccess` becomes `false`. Previously: - In `lib/firehose.dart`, saving `existingCommentId` to `./output/commentId` and generating `./output/comment.md` was guarded strictly by `if (results.hasSuccess)`. When `hasSuccess` was `false`, neither file was written. - As a result, the existing `Package publishing` comment with outdated `ready to publish` status and release links was never updated and remained on the PR indefinitely. ## Changes - **`lib/firehose.dart`**: Save `existingCommentId` to `./output/commentId` unconditionally whenever an existing publishing comment is found. When `results.hasSuccess || existingCommentId != null`, write `./output/comment.md` with the updated `$markdownTable` (omitting the `"If you have publishing permissions..."` description when no packages are ready to publish). - **`lib/src/github.dart`** & **`lib/src/local_github_api.dart`**: Add `deleteComment` helper to `GithubApi`. - **`bin/comment.dart`**: Add `delete` subcommand (`firehose:comment delete --comment-id <id>`). - **`test/firehose_test.dart`**: Add CLI argument validation and exit code tests for `comment delete`. - **`CHANGELOG.md`**: Note that existing publishing PR comments are updated with accurate status when packages are no longer ready to publish.
This repository is home to general Dart Ecosystem tools and packages.
| Package | Description | Version |
|---|---|---|
| blast_repo | A tool to bulk validate and fix GitHub repos. | |
| canary | Test package upgrades against the ecosystem. | |
| corpus | A tool to calculate the API usage for a package. | |
| dart_flutter_team_lints | An analysis rule set used by the Dart and Flutter teams. | |
| firehose | A tool to automate publishing of Pub packages from GitHub actions. | |
| repo_manage | Miscellaneous issue, repo, and PR query tools. | |
| sdk_triage_bot | A triage automation tool for dart-lang/sdk issues. | |
| trebuchet | A tool for moving existing packages into monorepos. |
Here's an overview of the main Dart team repositories:
| Main repo | Description |
|---|---|
| sdk | The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more. |
| SLO mono-repos | Description |
|---|---|
| core | This repository is home to core Dart packages. |
| tools | This repository is home to tooling related Dart packages. |
| labs | This repository is home to Dart ‘labs’ packages. |
| Topic mono-repos | Description |
|---|---|
| build | A build system for Dart written in Dart |
| ecosystem | This repository is home to general Dart Ecosystem tools and packages. |
| http | A composable API for making HTTP requests in Dart. |
| i18n | A general mono-repo for Dart i18n and l10n packages. |
| leak_tracker | A framework for memory leak tracking for Dart and Flutter applications. |
| macros | A Dart mono-repo for macro development. |
| native | Dart packages related to FFI and native assets bundling. |
| shelf | Web server middleware for Dart |
| test | A library for writing unit tests in Dart. |
| webdev | A CLI for Dart web development. |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
For additional information about contributing, see our contributing page.