Gathering detailed insights and metrics for auto
Gathering detailed insights and metrics for auto
Gathering detailed insights and metrics for auto
Gathering detailed insights and metrics for auto
npm install auto
Typescript
Module System
Min. Node Version
Node Version
NPM Version
64.4
Supply Chain
93.4
Quality
84.7
Maintenance
100
Vulnerability
96.1
License
TypeScript (98.9%)
JavaScript (1.01%)
Ruby (0.09%)
Total Downloads
7,447,651
Last Day
11,692
Last Week
47,997
Last Month
202,006
Last Year
2,700,280
2,303 Stars
6,355 Commits
207 Forks
17 Watching
49 Branches
99 Contributors
Latest Version
11.3.0
Package Id
auto@11.3.0
Unpacked Size
53.92 kB
Size
15.37 kB
File Count
19
NPM Version
lerna/7.1.4/node@v16.18.1+x64 (linux)
Node Version
16.18.1
Publised On
25 Oct 2024
Cumulative downloads
Total Downloads
Last day
1.9%
11,692
Compared to previous day
Last week
-8.7%
47,997
Compared to previous week
Last month
1%
202,006
Compared to previous month
Last year
32.9%
2,700,280
Compared to previous year
auto
is a tool designed to seamlessly automate the release workflow.
It is powered by semantic version labels on pull requests.
This approach does not require you to change your code or make any drastic changes to your current workflow.
While intended to run in a continuous integration (CI) environment, all auto
commands can run locally as well.
auto
is distributed through npm, but you can use it with a variety of package management platforms.
1npm install auto
For auto
installation in non-npm
environments follow these instructions.
Getting started with auto
is super easy.
If your project is already published or has releases then you need to make sure that your last release is tagged and that it's the Latest Release
on GitHub.
To tag your last release find the last commit where you bumped the version and run the following commands with your version number.
1git tag v1.2.3 2git push --tags
Then on GitHub go to your project's releases and click Draft a new release
.
In the Tag version
field enter the version number you just tagged and click Publish release
.
(OPTIONAL) Initialize all options and configure label text.
If this is not run then auto
will use the default configuration.
This command will produce an .autorc
.
You can configure most flags and all labels/changelogTitles.
1auto init
All options can also be configured via the .autorc
file.
As CLI options you supply them in snake-case (--foo-bar)
, but as .autorc
options you supply them in camelCase (fooBar)
,
Exclusive options (extends, labels) can only be set in the .autorc
and do not exist as CLI flags.
Any option in the .autorc
will get overridden by the CLI flags if provided.
The following are options that might be more useful to set in the .autorc
than with a flag:
1 baseBranch Configure what your repo considers the base branch. 2 plugins Specify your plugins to load 3 githubApi If you are using enterprise github, `auto` lets you configure the github API URL that it uses. 4 githubGraphqlApi If you are using enterprise github and your company hosts the graphql at some other URL than the 5 `githubApi`, you can use `githubGraphqlApi` to set the base path for `auto`. The `githubGraphqlApi` gets 6 merged with `/graphql` to build the final URL.
Configure environment variables
You must configure some environment variables for publishing and releasing to work properly.
GH_TOKEN
- Used for updating the changelog and publishing the GitHub releaseNPM_TOKEN
- Used to publish to npm. (only with NPM plugin)Local .env
:
You can also store these values in a local file at the root of your project named .env
.
Make sure to add this file to your .gitignore
so you don't commit any keys!
These environment variables will override any variable already set on the process.
This enables you to have a per project configuration that isn't effected by your global setup.
PROJECT_ROOT/.env
:
1GH_TOKEN=YOUR_TOKEN 2NPM_TOKEN=PUBLISH_TOKEN
Create your project's labels on github. If a label already exist, it will be updated.
The types of labels that auto
uses are:
To create the labels for your project on GitHub, run the following command with your GH_TOKEN
.
1GH_TOKEN=YOUR_TOKEN auto create-labels 2# or with .env file 3auto create-labels
Set up script
auto
is written so that each tool it exposes is useful in isolation.
To version, changelog, publish and release your code all at the same time we've included the shipit
tool.
This tool takes the default auto
workflow and puts it into one command.
It will:
baseBranch
baseBranch
1{ 2 "scripts": { 3 "release": "auto shipit" 4 } 5}
For detailed setup instructions,refer here
--help
)1$ auto --help 2 3auto 4 5 Generate releases based on semantic version labels on pull requests, and 6 other pull request automation tools. 7 8Synopsis 9 10 $ auto <command> <options> 11 12Setup Command 13 14 init Interactive setup for minimum working configuration. 15 info Determine the environment and check if auto is set up correctly 16 create-labels Create your project's labels on github. If labels exist it will update them. 17 18Pull Request Interaction Commands 19 20 label Get the labels for a pull request. Doesn't do much, but the return value lets you write you own 21 scripts based off of the PR labels! 22 comment Comment on a pull request with a markdown message. Each comment has a context, and each context only 23 has one comment. 24 pr-check Check that a pull request has a SemVer label 25 pr-status Set the status on a PR commit 26 pr-body Update the body of a PR with a message. Appends to PR and will not overwrite user content. Each 27 comment has a context, and each context only has one comment. 28 29Release Commands 30 31 version Get the semantic version bump for the given changes. Requires all PRs to have labels for the change 32 type. If a PR does not have a label associated with it, it will default to `patch`. 33 changelog Prepend release notes to `CHANGELOG.md`, create one if it doesn't exist, and commit the changes. 34 release Auto-generate a github release 35 shipit Context aware publishing. 36 37 1. call from base branch -> latest version released (LATEST) 38 2. call from prerelease branch -> prerelease version released (NEXT) 39 3. call from PR in CI -> canary version released (CANARY) 40 4. call locally when not on base/prerelease branch -> canary version released (CANARY) 41 latest Run the full `auto` release pipeline. Force a release to latest and bypass `shipit` safeguards. 42 canary Make a canary release of the project. Useful on PRs. If ran locally, `canary` will release a canary 43 version for your current git HEAD. This is ran automatically from "shipit". 44 45 1. In PR: 1.2.3-canary.123.0 + add version to PR body 46 2. Locally: 1.2.3-canary.1810cfd 47 next Make a release for your "prerelease" release line. This is ran automatically from "shipit". 48 49 1. Creates a prerelease on package management platform 50 2. Creates a "Pre Release" on GitHub releases page. 51 52 Calling the `next` command from a prerelease branch will publish a prerelease, otherwise it will 53 publish to the default prerelease branch. 54 55Global Options 56 57 -V, --version Display auto's version 58 -v, --verbose Show some more logs. Pass -vv for very verbose logs. 59 --repo string The repo to set the status on. Defaults to looking in the package definition 60 for the platform 61 --owner string The owner of the GitHub repo. Defaults to reading from the package definition 62 for the platform 63 --github-api string GitHub API to use 64 --plugins string[] Plugins to load auto with. (defaults to just npm) 65 -h, --help Display the help output
One caveat of auto
is that you need to be mindful of merging multiple PRs at once. You must not merge a PR while another is publishing (ex: lerna publish
). While this window is small, it exists and you should know about it.
auto
works by looking at the git
tree to calculate the version bump then makes commits for the CHANGELOG.md
and the new version. If you merge a PR while another is publishing:
The one exception to this rule with when merging a bunch of PRs with skip-release
labels.
You still can't merge a PR that triggers a release and then merge a PR with skip-release
. This will result in problem 3 from above.
But you can merge a bunch of PRs with skip-release
then merge a PR that triggers a release.
Because skip-release
is present no commits are made and the release is fine!
If you are using enterprise Github, auto
lets you configure the Github API URL that it uses. You can configure this by using the CLI option --github-api, by setting the value in your .autorc
, or during auto init
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/5 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
74 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Moreunplugin-auto-import
Register global imports on demand for Vite and Webpack
auto-correct
auto correct for command line tools
autoprefixer
Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
auto-bind
Automatically bind methods to their class instance