logo
0
2
Login
feat: 补充英文文档

Create PR Plugin

Support creating pull requests

Image

cnbcool/create-pr:latest

Supported Events

  • push
  • branch.create
  • branch.delete
  • pull_request
  • pull_request.target
  • pull_request.approved
  • pull_request.changes_requested
  • pull_request.mergeable
  • pull_request.merged
  • tag_push
  • vscode
  • auto_tag
  • tag_deploy.*

Parameter Description

  • target_branch: Target branch, type string, required. The target branch refers to the branch in the current repository.
  • head_branch: Source branch, type string, optional. Defaults to current branch name CNB_BRANCH. The source branch refers to the branch in the current repository, or a cross-repository branch when doing cross-repository PR.
  • head_repo_slug: Source repository slug, type string, required for cross-repository PR.
  • title: PR title, type string, optional.
  • body: PR content, type string, optional.
  • reviewers: PR reviewers, type string, multiple values separated by ,, optional.
  • assinees: PR assignees, type string, multiple values separated by ,, optional.
  • labels: PR labels, type string, multiple values separated by ,, optional.

Usage in Cloud Native Build

$: push: - stages: - name: Create PR on push event image: cnbcool/create-pr:latest settings: title: "test" target_branch: "main" reviewers: "xxx" assignees: "xxx"

After executing the above code, it will create a PR named test, with the current branch as source, main as target branch, xxx as reviewer, and xxx as assignee.