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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yuki-no/plugin-batch-pr

v1.0.19

Published

Batch PR plugin for yuki-no - Collects opened Yuki-no translation issues and creates a single pull request

Downloads

798

Readme

@yuki-no/plugin-batch-pr

NPM Version

Collects opened Yuki-no translation issues and creates a single pull request to consolidate changes.

Usage

- uses: Gumball12/yuki-no@v1
  env:
    # [optional]
    # Specifies the root directory path in the `head-repo`
    # that should be stripped when applying changes to `upstream-repo`
    YUKI_NO_BATCH_PR_ROOT_DIR: head-repo-dirname

    # [optional]
    # file patterns that should be excluded from batch PR
    YUKI_NO_BATCH_PR_EXCLUDE: |
      head-repo-patterns
  with:
    plugins: |
      @yuki-no/plugin-batch-pr@latest

Configuration

This plugin reads configuration from environment variables:

  • YUKI_NO_BATCH_PR_ROOT_DIR (optional): Specifies the root directory path in the head-repo that should be stripped from file paths when applying changes to the upstream-repo. When set, this prefix will be removed from head-repo file paths before applying changes. If not specified, files will be applied with their original paths.
  • YUKI_NO_BATCH_PR_EXCLUDE (optional): Specifies file patterns to exclude from batch PR processing. Supports glob patterns and multiple patterns separated by newlines.

YUKI_NO_BATCH_PR_ROOT_DIR

The YUKI_NO_BATCH_PR_ROOT_DIR option allows you to specify a root directory path in the head repository that should be stripped when applying changes to the upstream repository. This is particularly useful when your head repository has a different directory structure than your upstream repository.

For example, if your head repository has documentation in a docs/ folder, but your upstream repository expects the files at the root level, you can configure:

env:
  YUKI_NO_BATCH_PR_ROOT_DIR: docs

This will ensure that when applying changes from docs/README.md in your head repository, they will be applied to README.md in the upstream repository (the docs/ prefix is stripped).

YUKI_NO_BATCH_PR_EXCLUDE

The YUKI_NO_BATCH_PR_EXCLUDE option allows you to specify head-repo file patterns that should be excluded from batch PR processing. This is useful when you want to exclude certain files like build artifacts, temporary files, or sensitive files from being included in the batch PR.

The option supports glob patterns and can accept multiple patterns, each on a separate line:

env:
  # Specify `head-repo` file patterns
  YUKI_NO_BATCH_PR_EXCLUDE: |
    *.log
    temp/**
    build/*
    .env*
    **/*.tmp

Files matched by YUKI_NO_BATCH_PR_EXCLUDE are intentionally NOT applied by the plugin. They will be listed in the batch PR body under "Excluded Files (manual changes required)", so you can quickly see what to update manually.

Note that this behaves slightly differently from Yuki-no's exclude option. The exclude option is used when creating issues from head-repo changes. For more details, please refer to the Yuki-no Configuration section.

Permissions

This plugin requires additional permissions beyond the default yuki-no setup:

permissions:
  # Default yuki-no permissions
  issues: write
  actions: read

  # Required for branch creation and push operations
  contents: write

  # Required for batch PR creation
  pull-requests: write

Additionally, you need to enable "Allow GitHub Actions to create and approve pull requests" in your repository settings:

Set workflow permissions

  1. Go to SettingsActionsGeneral
  2. Under Workflow permissions, check "Allow GitHub Actions to create and approve pull requests"
  3. Click "Save"

These permissions are required because the plugin needs to create pull requests.

Configuration

This plugin uses yuki-no's built-in include and exclude options to determine which files to track.

How It Works

  1. Collects all opened yuki-no translation issues
  2. Extracts file changes from each issue's commits
  3. Applies changes to a unified branch
  4. Creates or updates a single pull request with all changes
  5. Links all related issues in the PR description

Important Notes

Closed Issue Handling

When an issue tracked in a batch PR is closed, the plugin does not automatically revert its changes from the batch PR. This behavior is intentional for the following reasons:

  • Preserves manual edits: Prevents accidental removal of changes you may have made directly in the batch PR
  • Avoids complex conflicts: Reduces the risk of merge conflicts with other tracked issues
  • Maintains stability: Ensures predictable behavior and file states

If you need to remove changes from closed issues, close the current batch PR and re-run the yuki-no action to create a fresh batch PR with only the currently open issues.

Release Tracking Integration

When using @yuki-no/plugin-release-tracking, not released issues are automatically excluded from batch PR collection. If release tracking is not installed, all opened translation issues will be included in the batch as normal.