Skip to content

Commit

Permalink
docs: use consistent link styles, update badges, regenerate docs, few…
Browse files Browse the repository at this point in the history
… verbiage changes
  • Loading branch information
Xunnamius committed Jan 29, 2023
1 parent 82312c4 commit 0ded9c3
Show file tree
Hide file tree
Showing 29 changed files with 772 additions and 700 deletions.
27 changes: 14 additions & 13 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Support [![Average issue resolution time][badge-issue-resolution]][link-issue-resolution] [![Issue open percentage][badge-issue-percentage]][open-issues]
# Support [![Average issue resolution time][x-badge-resolution-image]][x-badge-resolution-link] [![Issue open percentage][x-badge-percentage-image]][x-repo-open-issues]

Need help? Want to help this project? See below!

## Reporting an Issue

Before you begin, please [search open and past issues][open-issues] to see if
your issue or feature request is already being talked about.
Before you begin, please [search open and past issues][x-repo-open-issues] to
see if your issue or feature request is already being talked about.

If you find your issue already exists, make sure to [bump the issue by adding a
reaction][github-blog]. **If you're serious about wanting an issue to get
Expand All @@ -26,7 +26,7 @@ reaction emojis being present on issues, PRs, and replies:
### Bug Reports and Feature Requests

For the timeliest resolution to bug reports specifically, please make a good
faith effort to [follow the template][choose-new-issue]. The more quality
faith effort to [follow the template][x-repo-choose-new-issue]. The more quality
information you can provide, the quicker a fix will be found. Additionally:

- Ensure you file one issue per problem or feature request.
Expand All @@ -35,8 +35,8 @@ information you can provide, the quicker a fix will be found. Additionally:
experiencing identical behavior or behavior that stems from the exact same
problem.

That's it! You are now ready to [submit a new issue][choose-new-issue]! Thank
you for contribution 🎉, your efforts are greatly appreciated! 🙌🏿
That's it! You are now ready to [submit a new issue][x-repo-choose-new-issue]!
Thank you for contribution 🎉, your efforts are greatly appreciated! 🙌🏿

#### Closure Policy

Expand All @@ -45,15 +45,16 @@ you for contribution 🎉, your efforts are greatly appreciated! 🙌🏿
guidelines.
- Issues that go for an extended period without activity are subject to closure.

[badge-issue-percentage]:
[github-blog]:
https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments
[x-badge-percentage-image]:
https://isitmaintained.com/badge/open/Xunnamius/unified-utils.svg
'Open issues as a percentage of all issues'
[badge-issue-resolution]:
[x-badge-resolution-image]:
https://isitmaintained.com/badge/resolution/Xunnamius/unified-utils.svg
'Average time to resolve an issue'
[choose-new-issue]: https://github.com/Xunnamius/unified-utils/issues/new/choose
[github-blog]:
https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments
[link-issue-resolution]:
[x-badge-resolution-link]:
https://isitmaintained.com/project/Xunnamius/unified-utils
[open-issues]: https://github.com/Xunnamius/unified-utils/issues?q=
[x-repo-choose-new-issue]:
https://github.com/Xunnamius/unified-utils/issues/new/choose
[x-repo-open-issues]: https://github.com/Xunnamius/unified-utils/issues?q=
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ The ideal contributor flow is as follows:
- Ensure any new tests still pass even when the `DEBUG` environment variable
is defined.
6. Push your commits to your fork and, when you're ready, [_fearlessly_ submit
your PR][pr-compare]! Your changes will be tested in our CI pipeline.
your PR][x-repo-pr-compare]! Your changes will be tested in our CI pipeline.
7. Pat yourself on the back! Your hard work is well on its way to being reviewed
and, if everything looks good, merged and released 🚀

Additionally, there are a few things you can do to greatly increase the
likelihood your PR passes review:

- **Do** [open an issue][choose-new-issue] and discuss your proposed changes (to
prevent wasting your valuable time, e.g. _maybe we're already working on a
fix!_), and [search][open-issues] to see if there are any existing issues
related to your concerns.
- **Do** [open an issue][x-repo-choose-new-issue] and discuss your proposed
changes (to prevent wasting your valuable time, e.g. _maybe we're already
working on a fix!_), and [search][open-issues] to see if there are any
existing issues related to your concerns.
- **Do** practice [atomic committing][atomic-commits].
- **Do not** reduce code coverage ([codecov][codecov] checks are performed
during CI).
Expand All @@ -76,7 +76,6 @@ likelihood your PR passes review:
At this point, you're ready to create your PR and ✨ contribute ✨!

[atomic-commits]: https://www.codewithjason.com/atomic-commits-testing
[choose-new-issue]: https://github.com/Xunnamius/unified-utils/issues/new/choose
[code-of-conduct]: /.github/CODE_OF_CONDUCT.md
[codecov]: https://about.codecov.io
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0#summary
Expand All @@ -92,5 +91,7 @@ At this point, you're ready to create your PR and ✨ contribute ✨!
[open-issues]: https://github.com/Xunnamius/unified-utils/issues?q=
[pkg-debug]: https://www.npmjs.com/package/debug
[pkg-debug-wildcards]: https://www.npmjs.com/package/debug#wildcards
[pr-compare]: https://github.com/Xunnamius/unified-utils/compare
[projector]: https://github.com/Xunnamius/unified-utils#readme
[x-repo-choose-new-issue]:
https://github.com/Xunnamius/unified-utils/issues/new/choose
[x-repo-pr-compare]: https://github.com/Xunnamius/unified-utils/compare
146 changes: 146 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Maintaining

This is documentation for maintainers of this project.

## Code of Conduct

Please [review][1], understand, and be an example of it. Violations of the code
of conduct are taken seriously, even (especially) for maintainers.

## Issues

We want to support and build the community. We do that best by helping people
learn to solve their own problems. We have an issue template and hopefully most
folks follow it. If it's not clear what the issue is, invite them to create a
minimal reproduction of what they're trying to accomplish or the bug they think
they've found.

Once it's determined that a code change is necessary, point people to
[makeapullrequest.com][2] and invite them to make a pull request. If they're the
one who needs the feature, they're the one who can build it. If they need some
hand holding and you have time to lend a hand, please do so. It's an investment
into another human being, and an investment into a potential maintainer.

Remember that this is open source, so the code is not yours, it's ours. If
someone needs a change in the codebase, you don't have to make it happen
yourself. Commit as much time to the project as you want/need to. Nobody can ask
any more of you than that.

## Pull Requests

As a maintainer, you're fine to make your branches on the main repo or on your
own fork. Either way is fine.

When we receive a pull request, a GitHub Actions build is kicked off
automatically (see [`.github/workflows`][3]). We avoid merging anything that
fails the Actions workflow.

Please review PRs and focus on the code rather than the individual. You never
know when this is someone's first ever PR and we want their experience to be as
positive as possible, so be uplifting and constructive.

When you merge the pull request, 99% of the time you should use the [rebase and
merge][4] feature. This keeps our git history clean. If commit messages need to
be adjusted, maintainers should force push new commits with adjusted messages to
the PR branch before merging it in.

The [squash and merge][5] feature can also be used, but keep in mind that
squashing commits will likely damage the [generated][6] [CHANGELOG.md][7],
hinder [bisection][8], and result in [non-atomic commits][9], so use it
sparingly.

## Release

Our releases are automatic. They happen whenever code lands into `master`. A
GitHub Actions build gets kicked off and, if it's successful, a tool called
[`semantic-release`][10] is used to automatically publish a new release to npm
and GitHub along with an updated changelog. It is only able to determine the
version and whether a release is necessary by the git commit messages. With this
in mind, **please brush up on [the commit message convention][commit] which
drives our releases.**

> One important note about this: please make sure that commit messages do NOT
> contain the words "BREAKING CHANGE" in them unless we want to push a major
> version. I've been burned by this more than once where someone will include
> "BREAKING CHANGE: None" and it will end up releasing a new major version. Do
> not do this!
### Manual Releases

This project has an automated release set up. That means things are only
released when there are useful changes in the code that justify a release. See
[the release rules][11] for a list of commit types that trigger releases.

However, sometimes things get messed up (e.g. CI workflow / GitHub Actions
breaks) and we need to trigger a release ourselves. When this happens,
semantic-release can be triggered locally by following these steps:

> If one of these steps fails, you should address the failure before running the
> next step.
```bash
# These command must be run from the project root. It is recommended to clone a
# fresh version of the repo to a temp directory and run these commands from
# there.

# 1. Install dependencies and add your auth tokens to the .env file.
# ! DO NOT COMMIT THE .env FILE !
cp .env.default .env
npm ci

# 2. Reset the working directory to a clean state (deletes all ignored files).
npm run clean

# 3. Lint all files.
npm run lint:all

# 4. Build distributables.
npm run build:dist

# 5. Build auxiliary documentation.
npm run build:docs

# 6. Build any external executables (used in GitHub Actions workflows).
npm run build:externals

# 7. Format all files.
npm run format

# 8. Run all possible tests and generate coverage information.
npm run test:all

# 9. Upload coverage information to codecov (only if you have the proper token).
CODECOV_TOKEN=$(npx --yes dotenv-cli -p CODECOV_TOKEN) codecov

# 10. Trigger semantic-release locally and generate a new release. This requires
# having tokens for NPM and GitHub with the appropriate permissions.
#
# Do a dry run first:
NPM_TOKEN="$(npx --yes dotenv-cli -p NPM_TOKEN)" GH_TOKEN="$(npx --yes dotenv-cli -p GITHUB_TOKEN)" HUSKY=0 UPDATE_CHANGELOG=true GIT_AUTHOR_NAME="$(npx --yes dotenv-cli -p GIT_AUTHOR_NAME)" GIT_COMMITTER_NAME="$(npx --yes dotenv-cli -p GIT_COMMITTER_NAME)" GIT_AUTHOR_EMAIL="$(npx --yes dotenv-cli -p GIT_AUTHOR_EMAIL)" GIT_COMMITTER_EMAIL="$(npx --yes dotenv-cli -p GIT_COMMITTER_EMAIL)" node node_modules/.bin/semantic-release --no-ci --extends "$(pwd)/release.config.js" --dry-run
# Then do the actual publish:
NPM_TOKEN="$(npx --yes dotenv-cli -p NPM_TOKEN)" GH_TOKEN="$(npx --yes dotenv-cli -p GITHUB_TOKEN)" HUSKY=0 UPDATE_CHANGELOG=true GIT_AUTHOR_NAME="$(npx --yes dotenv-cli -p GIT_AUTHOR_NAME)" GIT_COMMITTER_NAME="$(npx --yes dotenv-cli -p GIT_COMMITTER_NAME)" GIT_AUTHOR_EMAIL="$(npx --yes dotenv-cli -p GIT_AUTHOR_EMAIL)" GIT_COMMITTER_EMAIL="$(npx --yes dotenv-cli -p GIT_COMMITTER_EMAIL)" node node_modules/.bin/semantic-release --no-ci --extends "$(pwd)/release.config.js"
```

<!-- lint ignore -->

## Thanks!

Thank you so much for helping to maintain this project!

[commit]:
https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
[1]: ./.github/CODE_OF_CONDUCT.md
[2]: http://makeapullrequest.com
[3]: ./.github/workflows
[4]:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#rebase-and-merge-your-commits
[5]:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits
[6]: https://github.com/conventional-changelog/conventional-changelog
[7]: https://www.conventionalcommits.org/en/v1.0.0
[8]:
https://www.metaltoad.com/blog/beginners-guide-git-bisect-process-elimination
[9]: https://dev.to/paulinevos/atomic-commits-will-help-you-git-legit-35i7
[10]: https://github.com/semantic-release/semantic-release
[11]:
https://github.com/Xunnamius/unified-utils/blob/82312c4c1476796724169c1b44fc6128aeeb57fb/release.config.js#L27
65 changes: 34 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- badges-start -->

[![Black Lives Matter!][badge-blm]][link-blm]
[![Last commit timestamp][badge-last-commit]][link-repo]
[![Open issues][badge-issues]][link-issues]
[![Pull requests][badge-pulls]][link-pulls]
[![Uses semantic-release][badge-semantic-release]][link-semantic-release]
[![Black Lives Matter!][x-badge-blm-image]][x-badge-blm-link]
[![Last commit timestamp][x-badge-lastcommit-image]][x-badge-repo-link]
[![Open issues][x-badge-issues-image]][x-badge-issues-link]
[![Pull requests][x-badge-pulls-image]][x-badge-pulls-link]
[![Uses semantic-release][x-badge-semanticrelease-image]][x-badge-semanticrelease-link]

<!-- badges-end -->

Expand Down Expand Up @@ -88,12 +88,13 @@ back upstream.

## Contributing and Support

**[New issues][choose-new-issue] and [pull requests][pr-compare] are always
welcome and greatly appreciated! 🤩** Just as well, you can [star 🌟 this
project][link-repo] to let me know you found it useful! ✊🏿 Thank you!
**[New issues][x-repo-choose-new-issue] and [pull requests][x-repo-pr-compare]
are always welcome and greatly appreciated! 🤩** Just as well, you can [star 🌟
this project][x-badge-repo-link] to let me know you found it useful! ✊🏿 Thank
you!

See [CONTRIBUTING.md][contributing] and [SUPPORT.md][support] for more
information.
See [CONTRIBUTING.md][x-repo-contributing] and [SUPPORT.md][x-repo-support] for
more information.

### Contributors

Expand Down Expand Up @@ -136,31 +137,34 @@ Thanks goes to these wonderful people ([emoji key][24]):
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- remark-ignore-end -->

This project follows the [all-contributors][25] specification. Contributions of
any kind welcome!
This project follows the [all-contributors][x-repo-all-contributors]
specification. Contributions of any kind welcome!

[badge-blm]: https://xunn.at/badge-blm 'Join the movement!'
[badge-issues]:
https://img.shields.io/github/issues/Xunnamius/unified-utils
[x-badge-blm-image]: https://xunn.at/badge-blm 'Join the movement!'
[x-badge-blm-link]: https://xunn.at/donate-blm
[x-badge-issues-image]:
https://img.shields.io/github/issues/Xunnamius/unified-utils?style=flat-square
'Open issues'
[badge-last-commit]:
https://img.shields.io/github/last-commit/xunnamius/unified-utils
[x-badge-issues-link]: https://github.com/Xunnamius/unified-utils/issues?q=
[x-badge-lastcommit-image]:
https://img.shields.io/github/last-commit/xunnamius/unified-utils?style=flat-square
'Latest commit timestamp'
[badge-pulls]:
https://img.shields.io/github/issues-pr/xunnamius/unified-utils
[x-badge-pulls-image]:
https://img.shields.io/github/issues-pr/xunnamius/unified-utils?style=flat-square
'Open pull requests'
[badge-semantic-release]:
https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[x-badge-pulls-link]: https://github.com/xunnamius/unified-utils/pulls
[x-badge-repo-link]: https://github.com/xunnamius/unified-utils
[x-badge-semanticrelease-image]:
https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square
'This repo uses semantic-release!'
[choose-new-issue]: https://github.com/xunnamius/unified-utils/issues/new/choose
[contributing]: CONTRIBUTING.md
[link-blm]: https://xunn.at/donate-blm
[link-issues]: https://github.com/Xunnamius/unified-utils/issues?q=
[link-pulls]: https://github.com/xunnamius/unified-utils/pulls
[link-repo]: https://github.com/xunnamius/unified-utils
[link-semantic-release]: https://github.com/semantic-release/semantic-release
[pr-compare]: https://github.com/xunnamius/unified-utils/compare
[support]: .github/SUPPORT.md
[x-badge-semanticrelease-link]:
https://github.com/semantic-release/semantic-release
[x-repo-all-contributors]: https://github.com/all-contributors/all-contributors
[x-repo-choose-new-issue]:
https://github.com/xunnamius/unified-utils/issues/new/choose
[x-repo-contributing]: CONTRIBUTING.md
[x-repo-pr-compare]: https://github.com/xunnamius/unified-utils/compare
[x-repo-support]: .github/SUPPORT.md
[1]: https://github.com/syntax-tree/unist
[2]: https://github.com/syntax-tree/mdast
[3]: https://github.com/remarkjs
Expand All @@ -187,4 +191,3 @@ any kind welcome!
https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-empty-url
[23]: https://github.com/Xunnamius/projector/blob/main/packages/config-remark
[24]: https://allcontributors.org/docs/en/emoji-key
[25]: https://github.com/all-contributors/all-contributors
9 changes: 5 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

If the issue is related to a public alert from OWASP/GitHub/Dependabot/CVE/etc
and [does not already have an open issue][open-issues], feel free to [open a new
issue][choose-new-issue]. Otherwise, please report any security vulnerability,
other security-related incident, or otherwise sensitive subject to us [via
email][security-mailto].
issue][x-repo-choose-new-issue]. Otherwise, please report any security
vulnerability, other security-related incident, or otherwise sensitive subject
to us [via email][security-mailto].

Thank you for your contribution!

[badge-security]:
https://snyk.io/test/github/Xunnamius/unified-utils/badge.svg
'Number of vulnerabilities (scanned by Snyk)'
[choose-new-issue]: https://github.com/Xunnamius/unified-utils/issues/new/choose
[link-security]: https://snyk.io/test/github/Xunnamius/unified-utils
[open-issues]: https://github.com/Xunnamius/unified-utils/issues?q=
[security-mailto]:
mailto:[email protected]?subject=ALERT%3A%20SECURITY%20INCIDENT%3A%20%28five%20word%20summary%29
[x-repo-choose-new-issue]:
https://github.com/Xunnamius/unified-utils/issues/new/choose
Loading

0 comments on commit 0ded9c3

Please sign in to comment.