Skip to content

Commit

Permalink
Ensure PR labels and provide PR template (#288)
Browse files Browse the repository at this point in the history
* chore: add pull request template

* chore: ensure pull request has label

* chore: add list of labels

* chore: enable git completion in bash terminal

* feat: use minimal set of labels
  • Loading branch information
britsta authored Dec 18, 2024
1 parent 02e5e20 commit 6091f24
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

RUN echo '\nsource /usr/share/bash-completion/completions/git' >> /home/vscode/.bashrc
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Readiness checklist

- [ ] I ensured that the PR title is good enough.
- [ ] I labeled the PR.
- [ ] I self-reviewed the PR.

<!-- # Description -->
33 changes: 33 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# https://github.com/repository-settings/app

repository:
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
allow_auto_merge: true
allow_update_branch: true
delete_branch_on_merge: true

labels:
- name: bug
color: "#d73a4a"
description: Something isn't working
- name: chore
color: "#c2e0c6"
description: Some routine work like updating dependencies
- name: ci
color: "#DFB5FD"
description: Continuous Integration related stuff
- name: dependencies
color: "#0366d6"
description: Pull requests that update dependencies
- name: enhancement
color: "#a2eeef"
description: New feature or request
- name: refactoring
color: "#880361"
description: Refactoring of code
- name: wip
color: "#32BF4C"
description: Work in Progress (blocks mergify from auto update the branch)
17 changes: 17 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check Pull Request

on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]

jobs:
validate-pr-label:
name: Validate the Pull Request's labels
runs-on: ubuntu-latest
steps:
- name: PR must be labeled
uses: jesusvasquez333/[email protected]
with:
disable-reviews: true
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "bug, chore, ci, dependencies, enhancement, refactoring"

0 comments on commit 6091f24

Please sign in to comment.