npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

semantic-release-pr-analyzer

v1.6.0

Published

Both @semantic-release/commit-analyzer and @semantic-release/release-notes-generator but for Pull Request description

Downloads

130

Readme

semantic-release-pr-analyzer

semantic-release plugin that imitates the behaviour when the team relies on the squash and merge strategy on GitHub.

Install

$ npm install semantic-release-pr-analyzer -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    [
      "semantic-release-pr-analyzer",
      {
        "strategy": "github"
      }
    ]
  ]
}

Configuration

Options

| Option | Description | Default | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | strategy | analyzing strategy | github | | commitAnalyzerConfig | standard commit-analyzer plugin configuration | default one for commit-analyzer | | notesGeneratorConfig | standard release-notes-generator plugin configuration | default one for release-notes-generator |

Strategy

GitHub strategy ({strategy: 'github'})

Once PR is merged, GitHib creates a squash commit in the main branch following the rules below:

| Number of commits in the pull request | Main Branch Commit Title | Main Branch Commit Description | | ------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | | Single commit | The title of the commit message for the single commit, followed by the pull request number | The body text of the commit message for the single commit | | More than one commit | The pull request title, followed by the pull request number | A list of the commit messages for all of the squashed commits, in date order |

You can read more about this in the official GitHub docs. This plugin hijacks semantic-release flow and replaces the commits list with the one that respects these rules into the mix.

Strict GitHub strategy ({strategy: 'strict-github'})

The same as the GitHub strategy, but it will throw an error if the first commit title is not equal to the pull request title.

Pull Request strategy ({strategy: 'pull-request'})

Always analyzes the pull request title and description as a commit.

Strict Pull Request strategy ({strategy: 'strict-pull-request'})

The same as the Pull Request strategy, but it will throw an error if the first commit body is not equal to the pull request description.

Environment variables

env.GITHUB_TOKEN

GitHub token to access your repository. Using the secrets.GITHUB_TOKEN value should be enough.

env.GITHUB_PR_NUMBER

The pull request number. In the context of GitHub actions, it is achievable as github.event.pull_request.number

env.GITHUB_REPOSITORY

Repository path, for example n0th1ng-else/semantic-release-pr-analyzer. For GitHub actions workflow it is set automatically.

Examples

You can see the sample configuration in the examples folder.