未验证 提交 cd5cecd0 编写于 作者: J jwithers 提交者: GitHub

check PR description for a BUG= line (#187)

* check PR description for a BUG= line

* Changed file name and added some more documentation.

* move the if to be on the steo instead of at the job.

This is to allow for the job to succeed (instead of being skipped) when
the BUG= text is found. And as a result we can have it be a required
status check.
Co-authored-by: NAdvait Jain <advaitjain@users.noreply.github.com>
Co-authored-by: NAdvait Jain <advaitjain@google.com>
上级 9345aa9c
name: Check PR has Bug
on:
pull_request:
types: [labeled]
jobs:
find-bug-tag:
runs-on: ubuntu-latest
steps:
- name: Check for BUG=
if: ${{ !contains(github.event.pull_request.body, 'BUG=') }}
run: |
echo "PR description requires a BUG= line with issue number."
echo "See https://testing.googleblog.com/2017/09/code-health-providing-context-with.html for additional context"
exit 1
......@@ -101,9 +101,8 @@ We strongly recommend that contributors:
* While github offers flexibility in linking
[commits and issues](https://github.blog/2011-04-09-issues-2-0-the-next-generation/#commits-issues),
we require that the PR description have a separate line with either
`Fixes #nn` (if the PR fixes the issue) or `Issue #nn` if the PR
addresses some aspect of an issue without fixing it.
we require that the PR description have a separate line with
`BUG=#nn`.
* We will be adding internal checks that automate this requirement by
matching the PR description to the regexp: `(Fixes|Issue) #`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册