devicons/devicon

Add a `do not merge` label that prevents merging

Open

#1,684 建立於 2023年2月18日

在 GitHub 查看
 (3 留言) (1 反應) (0 負責人)CSS (2,448 fork)batch import
devopsgood first issue

倉庫指標

Star
 (11,625 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Discussed in https://github.com/devicons/devicon/discussions/1429

Originally posted by Snailedlt October 4, 2022 Would it be useful to have a do not merge label? Maybe the PR could have a job that fails if the label is applied too.

Example implementation from here: https://www.jessesquires.com/blog/2021/08/24/useful-label-based-github-actions-workflows/#updated-21-march-2022

name: Do Not Merge

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

jobs:
  do-not-merge:
    if: ${{ contains(github.event.*.labels.*.name, 'do not merge') }}
    name: Prevent Merging
    runs-on: ubuntu-latest
    steps:
      - name: Check for label
        run: |
          echo "Pull request is labeled as 'do not merge'"
          echo "This workflow fails so that the pull request cannot be merged"
          exit 1

貢獻者指南