Skip to content

actions-cool/verify-files-modify

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

⚡ Verify Files Modify

Verify PR files modification.

Currently only pull_request and pull_request_target triggering is supported.

How to use ?

name: Verify Files modify

on:
  pull_request_target:
    types: [opened, edited, reopened, synchronize, ready_for_review]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - name: verify-version
        uses: actions-cool/verify-files-modify@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          forbid-files: 'action.yml, LICENSE'
          forbid-paths: '.github/, dist/'
          assignees: 'xxx1, xxx2'
          comment: |
            Please don't modify this.
          close: true
Name Desc Type Required
token GitHub token string
forbid-files Forbid files. Higher than allowed. Support multiple string
forbid-paths Forbid paths. Higher than allowed. Support multiple string
allowed-files Allowed files. Support multiple string
allowed-paths Allowed paths. Support multiple string
skip-verify-authority Skip verify by creator authority. Option: read write admin string
skip-verify-users Skip verify by creator userid. Support multiple string
skip-label Skip label string
comment Comment when verification success string
comment-mark Comment mark to find. string
assignees Assignees when verification success string
close Close PR when verification success boolean
set-failed When hit, whether set failed. Default true boolean

Note

  • When PR come from fork, it requires pull_request_target to comment or close. When use pull_request_target, must read
  • When use pull_request and PR come from fork. It will show CI badge status only
  • skip-verify-users: like 'x1, x2, x3'

⚡ Feedback

You are very welcome to try it out and put forward your comments. You can use the following methods:

  • Report bugs or consult with Issue
  • Submit Pull Request to improve the code of verify-files-modify

也欢迎加入 钉钉交流群

Changelog

CHANGELOG

LICENSE

MIT