Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Build GitHub Release

auto-author-assign

GitHub Actions: Automatically assign pull request authors.

OG image

Why this action?

In most cases, the pull request author should be assigned as an assignee of the pull request.

This action automatically assigns the pull request author as an assignee.

Usage

# .github/workflows/auto-author-assign.yml
name: Auto Author Assign

on:
  pull_request_target:
    types: [ opened, reopened ]

permissions:
  pull-requests: write

jobs:
  assign-author:
    runs-on: ubuntu-slim
    steps:
      - uses: toshimaru/auto-author-assign@v3.0.3

Use your own token

You can specify your own token.

jobs:
  assign-author:
    runs-on: ubuntu-slim
    steps:
      - uses: toshimaru/auto-author-assign
        with:
          repo-token: ${{ secrets.YOUR_TOKEN }}

If not specified, GITHUB_TOKEN will be used by default.

Enable auto-author-assign for issues

An issue's author can be automatically assigned as an issue assignee.

  • Add issues to the trigger
  • Add issues: write to the permissions
on:
  issues:
    types: [ opened, reopened ]
  pull_request_target:
    types: [ opened, reopened ]

permissions:
  issues: write
  pull-requests: write

jobs:
  ...

Skip assigning the author

The auto-author-assign action skips assigning the author when:

  1. Someone is already assigned as an assignee
  2. The author is a bot (this does not cover machine-user accounts)
  3. The username is in the skip-users list
jobs:
  assign-author:
    runs-on: ubuntu-slim
    steps:
      - uses: toshimaru/auto-author-assign
        with:
          skip-users: super-user,machine-user-bot

skip-users also accepts a newline-separated list:

      - uses: toshimaru/auto-author-assign
        with:
          skip-users: |
            super-user
            machine-user-bot

About

GitHub Actions: Automatically assign pull request authors.

Topics

Resources

Stars

137 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages