|
1 | | -#!/usr/bin/env bash |
2 | | -set -euo pipefail |
| 1 | +#!/bin/sh |
| 2 | +# ---------------------------------------------------------------------------- |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +# or more contributor license agreements. See the NOTICE file |
| 5 | +# distributed with this work for additional information |
| 6 | +# regarding copyright ownership. The ASF licenses this file |
| 7 | +# to you under the Apache License, Version 2.0 (the |
| 8 | +# "License"); you may not use this file except in compliance |
| 9 | +# with the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
3 | 19 |
|
4 | 20 | # Minimal issue manager script to handle a subset of prow-style commands |
5 | 21 | # Reads the GitHub issue_comment event JSON pointed to by GITHUB_EVENT_PATH |
6 | 22 | # Requires GITHUB_TOKEN env and GITHUB_REPOSITORY env (owner/repo) |
| 23 | +# |
| 24 | +# Supported Commands: |
| 25 | +# ------------------- |
| 26 | +# Command | Function | Example | Status |
| 27 | +# --------------- | --------------------------- | ---------------------------- | ------ |
| 28 | +# /assign | Assign issue to users | /assign or /assign @user | Normal |
| 29 | +# /unassign | Unassign users | /unassign or /unassign @user | Normal |
| 30 | +# /lgtm | Add lgtm label | /lgtm | Normal |
| 31 | +# /approve | Add approved label | /approve | Normal |
| 32 | +# /area | Add area label | /area plugin | Normal |
| 33 | +# /priority | Add priority label | /priority high | Normal |
| 34 | +# /remove | Remove label | /remove bug | Normal |
| 35 | +# /hold | Add hold label | /hold | Normal |
| 36 | +# /unhold | Remove hold label | /unhold | Normal |
| 37 | +# /close | Close issue | /close | Normal |
| 38 | +# /reopen | Reopen issue | /reopen | Normal |
| 39 | +# /lock | Lock issue | /lock | Normal |
| 40 | +# /unlock | Unlock issue | /unlock | Normal |
| 41 | +# /milestone | Set milestone | /milestone 5 | Normal |
| 42 | +# /cc | Mention users (comment) | /cc @user1 @user2 | Normal |
| 43 | +# /uncc | Unmention users (comment) | /uncc @user1 | Normal |
| 44 | + |
| 45 | +set -euo pipefail |
7 | 46 |
|
8 | 47 | GITHUB_API=${GITHUB_API:-https://api.github.com} |
9 | 48 |
|
|
0 commit comments