docbot

command module
v0.0.0-...-e61cf24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 10 Imported by: 0

README

Documentation Bot

Automatically label pull requests based on the checked task list.

Usage

Create a workflow .github/workflows/ci-documentbot.yml with below content:

name: Documentation Bot

on:
  pull_request_target:
    types:
      - opened
      - edited
      - labeled
      - unlabeled

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  label:
    if: ${{ github.repository == 'apache/pulsar' }}
    permissions:
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - name: Checkout action
        uses: actions/checkout@v3
        with:
          repository: apache/pulsar-test-infra
          ref: master

      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: 1.18

      - name: Labeling
        uses: ./docbot
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          LABEL_WATCH_LIST: 'doc,doc-required,doc-not-needed,doc-complete'
          LABEL_MISSING: 'doc-label-missing'

Configurations

Name Description Default
GITHUB_TOKEN The GitHub Token  
LABEL_PATTERN RegExp to extract labels '- \[(.*?)\] ?(.+?)'
LABEL_WATCH_LIST Label names to watch, separated by ,  
ENABLE_LABEL_MISSING Add a label missing if none selected true
LABEL_MISSING The label mssing name label-missing
ENABLE_LABEL_MULTIPLE Allow multiple labels selected false

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL