Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zulibot-action: Add commands-action. #707

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/commands-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Commands Action

on:
# Run the action whenever a comment is added on an issue or PR.
# (`issue_comment` event is triggered on PR comments as well.)
issue_comment:
types: created

jobs:
commands-action:
runs-on: ubuntu-latest
steps:
- name: Handle commands
uses: garg3133/zulipbot-action/commands-action@main
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
# Relative path to the commands-action config file.
config-file-path: .github/zulipbot-config/commands-action.yml
35 changes: 35 additions & 0 deletions .github/zulipbot-config/commands-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Enable @claim and @abandon issue commands.
assign:
# Maximum users who can claim a single issue.
max_assignees: 1

# Whether or not to invite the contributors claiming an issue
# for the first time on your repository, as a collaborator
# with the "pull" (read) permission on you repository, before
# assigning them the issue.
add_as_collaborator: true

# Restrictions on the new contributors.
new_contributors:
# Maximum issues a new contributor can claim at the same
# time.
max_issue_claims: 1

# Allow the new contributors to claim an issue only if it
# contains/does no contain certain labels.
assign_only_if:
any_label_present: ["good first issue", "help wanted"]

# Enable @add and @remove label commands.
label:
# @keywords:
# "all": All authenticated users on GitHub.
# "author": Author of issue or pull request.
# "member": Member of the organization containing the
# repository.
# "@username": Specific GitHub user.

# Users given full_permission can add or remove any labels on
# issues and pull requests.
full_permission:
to: ["author"]