ci: notice on automated branch

This commit is contained in:
lowlighter
2022-01-20 23:54:14 -05:00
parent 4d308c94bc
commit b2015056fb

27
.github/workflows/branches.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Check automated branches
on:
pull_request:
branches:
- main
- latest
- examples
jobs:
notice:
- name:
uses: actions/github-script@v5
with:
script: |
const {issue:{number:issue_number}, repo:{owner, repo}} = context
github.issues.createComment({issue_number, owner, repo, body:[
"Hello there 👋!",
"",
"It seems you have opened a pull request on either `main`, `latest` or `examples`.",
"These branches are fully-automated and do not accept human contributions.",
"",
"* To contribute to *metrics* code, open a pull request to `master` branch",
"* To contribute to *metrics* presets, open a pull request to `presets` branch",
"",
"Thanks for your cooperation 🦾!"
].join("\n")})