Skip to content

Commit 69e9ddb

Browse files
authored
wiki experiment (#76)
1 parent 30a9f49 commit 69e9ddb

9 files changed

+145
-0
lines changed

docs/Bug-Bankruptcy.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## What's this?
2+
3+
When triaging repos we periodically decide that some portion of the open issues are older,
4+
may be stale, or may no longer be relevant for the current goals of the project. In order
5+
for use to be able to effectively use our issues trackers, we may choose to close this
6+
category of issues as `closed-bug-bankruptcy`.
7+
8+
This is not intended as a commentary of the
9+
quality of the report, but part of our regular process to maintain good hygiene and utility
10+
of our issue trackers.
11+
12+
## I think a closed issue is still relevant
13+
14+
If you think an issue was closed in error, please:
15+
16+
- comment to that effect on the issue, or
17+
- re-open the issue, or
18+
- open a new issue (esp. if the original issue may not fully apply anymore)
19+
20+
We do expect some (smaller) portion of issues closed via a bug bankruptcy to later re-open.

docs/Changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changes to any package should be noted in their `CHANGELOG.md` file.
2+
3+
As a rule of thumb, it is advised to add an entry for changes to
4+
5+
* files in the `bin/` or 'lib/' directory,
6+
* the `pubspec.yaml`,
7+
* the `README.md`.

docs/Home.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Welcome to the ecosystem wiki!

docs/License-Header.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
All source files should start with this license header:
2+
3+
```
4+
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
5+
// for details. All rights reserved. Use of this source code is governed by a
6+
// BSD-style license that can be found in the LICENSE file.
7+
```
8+
9+
It can be added either manually or by running the following in your repository directory:
10+
11+
```bash
12+
dart pub global activate --source git https://github.com/mosuem/file_licenser
13+
dart pub global run file_licenser .
14+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For instructions on how to merge an existing repository into a monorepo, see https://github.com/dart-lang/tools/pull/100.

docs/Publishing-automation.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Contributions, PRs, and publishing
2+
3+
When contributing to packages that use our publishing validation and automation bot:
4+
5+
- if the package version is a stable semver version (`x.y.z`), the latest
6+
changes have been published to pub. Please add a new changelog section for
7+
your change, rev the service portion of the version, append `-dev`, and update
8+
the pubspec version to agree with the new version
9+
- if the package version ends in `-dev`, the latest changes are unpublished;
10+
please add a new changelog entry for your change in the most recent section.
11+
When we decide to publish the latest changes we'll drop the `-dev` suffix
12+
from the package version
13+
- for PRs, the `Publish` bot will perform basic validation of the info in the
14+
pubspec.yaml and CHANGELOG.md files
15+
- when the PR is merged into the main branch, if the change includes reving to
16+
a new stable version, a repo maintainer will tag that commit with the pubspec
17+
version (e.g., `v1.2.3`); that tag event will trigger the `Publish` bot to
18+
publish a new version of the package to pub.dev
19+
20+
If the `dart pub publish --dry-run` step is failing during PR validation, and
21+
it's for a reason that could legitimately be ignored (publishing using a
22+
pre-release SDK?), repo committers can add the `publish-ignore-warnings` label
23+
to the PR in order to ignore failures from a publishing dry-run.
24+
25+
## More publishing conventions
26+
27+
For more information on dart-lang package publishing and maintenance conventions,
28+
see https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance.
29+
30+
## For committers: publishing a release
31+
32+
> TLDR: After merging a PR, create a new GitHub release to publish it. This is best done
33+
using the link that firehose creates in the 'Package publishing' comment.
34+
35+
Once a new release is ready to go - the latest bits have landed in the default branch -
36+
it can be published by tagging the commit with a well-formed tag. Generally this is in
37+
the form of `package_name-v1.2.3`; the publishing automation will indicate the correct
38+
tag to use in the PR.
39+
40+
There are two ways to do this. One is by tagging the commit via the command line and
41+
pushing the new tag to the repo. That's correct, but there's a better way.
42+
43+
The 2nd way to publish is by creating a github release (see the `/releases` url of your
44+
repo; e.g., https://github.com/dart-lang/tools/releases). Creating a new release there
45+
will tag the commit as a by-product, which will trigger a release. To create a release:
46+
47+
- go to the `https://github.com/<org>/<repo>/releases` url
48+
- click 'draft a new release'
49+
- in 'choose tag', enter the tag of the correct publishing tag (you'll be creating a new tag)
50+
- in 'release title', enter the same text as the tag (by convention; this area is free-form)
51+
- in 'describe this release', enter the portion of the changelog entry for this release
52+
53+
Firehose will create a hyperlink in it's comment on the PR with all the release information
54+
filled out. After the PR is merged - and we're ready to publish - it is highly recommended to
55+
use this link to create the release (instead of manually filling in the information). This
56+
helps make our releases more standardized and less error-prone.

docs/Pull-Request-Health.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
To help developers and reviewers with creating PRs, we provide a Github CI action to do some simple checks. At the moment, we are checking for
2+
3+
* License headers
4+
* Changelog entry
5+
.
6+
7+
The workflow can be used by inserting the following into a `.github/workflows/health.yaml` file in your repository:
8+
```
9+
name: Health
10+
on:
11+
pull_request:
12+
branches: [ main ]
13+
types: [opened, synchronize, reopened, labeled, unlabeled]
14+
jobs:
15+
health:
16+
uses: dart-lang/ecosystem/.github/workflows/health.yaml@main
17+
# with:
18+
# checks: "version,changelog,license"
19+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Many of our repos currently use `master` as the name of the default branch; over time we'd like to have them instead use `main` as the name of the default branch.
2+
3+
### Renaming master to main
4+
5+
The work per-repo is fairly modest. For people who want to take this on, here are the steps:
6+
7+
- pre-announce the move (as a GitHub issue or as a communication to the active user group)
8+
- use the rename branch feature to rename `master` to `main`; this is available from the `<org>/<repo>/branches` page. If you do not have rights to rename the `master` branch, ping @devoncarew or @athomas
9+
- update references to the old branch name (generally in the `.github/workflows` workflow files)
10+
- for google3, in `third_party/dart/<packageName>/copy.bara.sky`, update the name of the branch that we sync to (`branch = "main"`)
11+
- message to users that the change was made and how to update any local checkouts
12+
13+
GitHub's doc for this are here: [renaming a branch](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch). In-lined from there: "when you rename a branch on GitHub.com, any URLs that contain the old branch name are automatically redirected to the equivalent URL for the renamed branch. Branch protection policies are also updated, as well as the base branch for open pull requests (including those for forks) and draft releases."
14+
15+
### Updating a local checkout
16+
17+
After a rename, people with local checkouts will need to run:
18+
19+
```
20+
git branch -m master main
21+
git fetch origin
22+
git branch -u origin/main main
23+
git remote set-head origin -a
24+
```
25+
26+
The GitHub UI will prompt users with the above steps the next time they visit the repo page.

docs/Test-Coverage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test coverage should not decrease by introducing a PR. An exception are files in `/bin`, which are generally not tested, and should be kept relatively free of logic for that reason.

0 commit comments

Comments
 (0)