Skip to content

BeeStation/Repo-Actions

Repository files navigation

Repo Actions

The repo actions for the Beestation codebase.

Repo-Actions is a framework for running Github actions for the Beestation codebase. It uses a modular structure where different modules can execute their behaviours, run on certain events, and provide functionality to the user.

Configuration

To add to a repo, add the following configuration:

name: Execute Management Actions

on:
  pull_request:
    types: [opened, reopened, synchronize, edited]  # triggers when PR is opened or updated
  issue_comment:
    types: [created]

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Run local action
        uses: BeeStation/Repo-Actions
        with:
          githubToken: ${{ secrets.GITHUB_TOKEN }}
          tagLabels: bug,documentation,enhancement

You can configure repo-actions by adding config settings after the with: node, the available configuration options are listed in each module.

Global configuration options:

Name Type Description
githubToken (Required) string The github token for the workflow, included in the configuration above.
createPRCommentBase string The text included in the comment that is created when a contributor opens a PR.

Modules

Below are the different modules that repo actions currently includes, along with their configuration options.

Size Module

The size module determines the size of pull-requests and labels them accordingly. It will provide a warning if a pull-request is too large and can be set to require that the author contribute fixes before allowing their pull-request to be reviewed.

This module is useful as it gives maintainers an instant overview of which pull-requests will likely be easy to review, so when limited on time/hardware can look directly at PRs that they can manage.

Configuration

Name Type Description
sizeLabels String A comma seperated list of 5 different labels representing the labels representing size. XS, S, M, L, XL

Time Estimation Module

The time estimation module uses recent pull-requests to make an estimation as to how long it would take for the pull-request to be processed. This can help set the expectations of contributors, and can be used to encourage smaller PRs.

Review Module

The review module labels pull-requests according to their review status. It additionally allows contributors to mark a single one of their pull-requests for priority review which can help maintainers avoid reviewing pull-requests that aren't being maintained by their author.

Pull-requests can be in several review states:

  • Awaiting: The default state for pull-requests, maintainers have not yet reviewed the pull-request.
  • Priority: The pull-request has been marked as wanting a priority review by the author. The author can only apply this to one PR at a time, so that it can be used to mark a single of their PRs as being focused on which allows maintainers to prioritise PRs that are being developed.
  • Response Required: The pull-request has a review from a maintainer which includes comments. The author must either make a commit which modifies the lines around the review comment, or must leave a response comment. Once this has been done, if the review was blocking, then the reviewer will be assigned to the pull-request until they clear their blocking review.
  • Approved: The pull-request has been approved by at least one maintainer and does not meet the conditions for 'Response Required'.
  • Unreviewable: The pull-request has one of the ignore labels set applied to it.

About

The beestation pull-request actions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages