mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
ci: close PRs that have commits made on GitHub Web
This commit is contained in:
parent
41c2100f0d
commit
ded46161f6
25
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
25
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
## Contribution checklist
|
||||||
|
|
||||||
|
Before contributing, I, the opener of this request:
|
||||||
|
|
||||||
|
- [ ] Agree to use the same license of each modified file;
|
||||||
|
- [ ] Have followed the [contribution guidelines](docs/CONTRIBUTE.md);
|
||||||
|
- [ ] I have tested it locally;
|
||||||
|
- [ ] I have committed locally and not through a git hosting service such as
|
||||||
|
GitHub Web; and
|
||||||
|
- [ ] I have reviewed and updated any documentation if relevant.
|
||||||
|
|
||||||
|
Lacking to check any of the above can result in the rejection of the
|
||||||
|
contribution without no further comment.
|
||||||
|
|
||||||
|
## What does this PR aims to accomplish?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## What does this PR change?
|
||||||
|
<!-- Issues must be referenced if they exist
|
||||||
|
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
.
|
56
.github/workflows/reject-pr.yaml
vendored
Normal file
56
.github/workflows/reject-pr.yaml
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# yamllint disable-line rule:line-length
|
||||||
|
# SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
---
|
||||||
|
name: Reject pull requests of user's that don't read the contribution guidelines
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.ref }}-1
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
- name: Block commits made using the GitHub WebUI
|
||||||
|
if: failure()
|
||||||
|
uses: peter-evans/close-pull@v3
|
||||||
|
with:
|
||||||
|
# yamllint disable-line rule:line-length
|
||||||
|
comment: 'Automatically closing this PR due to submitter not reading the contribution guidelines and using GitHub WebUI to commit. Please fix the issues and open a new PR after you have read the contribution guidelines.'
|
||||||
|
delete-branch: false
|
||||||
|
run: |
|
||||||
|
if test "${{ github.event_name}}" = "pull_request"
|
||||||
|
then
|
||||||
|
base="${{ github.event.pull_request.base.sha }}"
|
||||||
|
head="${{ github.event.pull_request.head.sha }}"
|
||||||
|
else
|
||||||
|
base="${{ github.event.before }}"
|
||||||
|
head="${{ github.event.after }}"
|
||||||
|
fi
|
||||||
|
if test "${base}" = "${head}" || test -z "${base}"
|
||||||
|
then
|
||||||
|
committer="$(git show -s --format=%cn ${head})"
|
||||||
|
else
|
||||||
|
committer="$(git show -s --format=%cn ${base}..${head})"
|
||||||
|
fi
|
||||||
|
if echo "${committer}" | grep -q "^GitHub$"; then
|
||||||
|
echo "Commit was made using the GitHub WebUI" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -3,7 +3,7 @@ Upstream-Name: qusal
|
|||||||
Upstream-Contact: Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
Upstream-Contact: Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
Source: https://github.com/ben-grande/qusal
|
Source: https://github.com/ben-grande/qusal
|
||||||
|
|
||||||
Files: README.md */README.md docs/* .github/ISSUE_TEMPLATE/*
|
Files: README.md */README.md docs/* .github/*_TEMPLATE/*
|
||||||
Copyright: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
Copyright: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||||
License: CC-BY-SA-4.0
|
License: CC-BY-SA-4.0
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ Qusal contribution guidelines.
|
|||||||
|
|
||||||
* [Respect](#respect)
|
* [Respect](#respect)
|
||||||
* [Starters](#starters)
|
* [Starters](#starters)
|
||||||
* [Requirements](#requirements)
|
* [Environment](#environment)
|
||||||
* [Issues](#issues)
|
* [Issues](#issues)
|
||||||
* [Lint](#lint)
|
* [Lint](#lint)
|
||||||
|
|
||||||
@ -40,8 +40,10 @@ made and what can be improved, see the [design guide](DESIGN.md).
|
|||||||
|
|
||||||
Experiment with some formulas, read them, understand what is being done.
|
Experiment with some formulas, read them, understand what is being done.
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
## Requirements
|
Setting up your environment is mandatory. Commits made using the Github Web
|
||||||
|
interface will be rejected.
|
||||||
|
|
||||||
For an automatic setup, use the [dev formula](../salt/dev), else, install the
|
For an automatic setup, use the [dev formula](../salt/dev), else, install the
|
||||||
packages below depending on the task:
|
packages below depending on the task:
|
||||||
|
Loading…
Reference in New Issue
Block a user