块编辑器开发文档

@wordpress/project-management-automation

💡 云策文档标注

概述

这是一个用于自动化管理 Gutenberg GitHub 仓库的 GitHub Action,包含首次贡献者标签添加、里程碑分配和问题指派等功能。它通过配置工作流文件来集成使用,适用于 WordPress 开发者优化项目管理流程。

关键要点

  • 自动化功能:为首次贡献者添加标签、分配插件发布里程碑、指派已修复问题并添加“进行中”标签。
  • 安装与使用:需在 GitHub 工作流配置文件中引用此 Action,并提供必需的 github_token 输入。
  • API 输入:github_token 为必需参数,用于 GitHub API 请求,应作为仓库密钥存储。
  • 包结构:这是 Gutenberg 项目 monorepo 中的一个独立 npm 包,支持贡献和发布。

代码示例

on: pull_request
jobs:
    pull-request-automation:
        runs-on: ubuntu-latest
        steps:
            - uses: WordPress/gutenberg/packages/project-management-automation@trunk
              with:
                  github_token: ${{ secrets.GITHUB_TOKEN }}

📄 原文内容

This is a GitHub Action which contains various automation to assist with managing the Gutenberg GitHub repository:

  • First Time Contributor: Adds the “First Time Contributor” label to pull requests merged on behalf of contributors that have not previously made a contribution, and prompts the user to link their GitHub account to their WordPress.org profile if necessary for release notes credit.
  • Add Milestone: Assigns the plugin release milestone to a pull request once it is merged.
  • Assign Fixed Issues: Adds assignee for issues which are marked to be “Fixed” by a pull request, and adds the “In Progress” label.

Installation and usage

To use the action, include it in your workflow configuration file:

on: pull_request
jobs:
    pull-request-automation:
        runs-on: ubuntu-latest
        steps:
            - uses: WordPress/gutenberg/packages/project-management-automation@trunk
              with:
                  github_token: ${{ secrets.GITHUB_TOKEN }}

API

Inputs

  • github_token: Required. GitHub API token to use for making API requests. This should be stored as a secret in the GitHub repository.

Outputs

None.

Contributing to this package

This is an individual package that’s part of the Gutenberg project. The project is organized as a monorepo. It’s made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project’s main contributor guide.