Issue events don't contain a 'comment' entry: https://developer.github.com/v3/issues/events/#response-2 Issue comments also contain the original issue body: https://developer.github.com/v3/activity/events/types/#issuecommentevent That's why it was triggering even for comments on the issue. Also changed to startsWith because there's no need to support the command anywhere in the body IMO. Fix #6895
29 lines
822 B
YAML
29 lines
822 B
YAML
# part of our release process, see `release-on-comment.py`
|
|
name: release on comment
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited]
|
|
issue_comment:
|
|
types: [created, edited]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
if: (github.event.comment && startsWith(github.event.comment.body, '@pytestbot please')) || (github.event.issue && !github.event.comment && startsWith(github.event.issue.body, '@pytestbot please'))
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.8"
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --upgrade setuptools tox
|
|
- name: Prepare release
|
|
run: |
|
|
tox -e release-on-comment -- $GITHUB_EVENT_PATH ${{ secrets.chatops }}
|