Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

skills/action-keyphrase-checker

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Keyphrase Checker Action 🔎

License: MIT GitHub release Continuous Integration

Search for keyphrases in text content or files. Validates if a specific phrase appears a minimum number of times with options for case sensitivity.

Basic Usage 🚀

Check for Keyphrase in a File

steps:
  - name: Check for required phrase in file
    id: keyphrase-check
    uses: skills/action-keyphrase-checker@v1
    with:
      text-file: 'path/to/file.md'
      keyphrase: 'GitHub'
      case-sensitive: false
      minimum-occurrences: 2

Check for Keyphrase in Direct Text

steps:
  - name: Check direct text content
    id: keyphrase-check
    uses: skills/action-keyphrase-checker@v1
    with:
      text: |
        Some text mentioning GitHub Actions and more GitHub Actions conten
      keyphrase: 'GitHub Actions'
      case-sensitive: true
      minimum-occurrences: 2

Check Maximum Occurrences

steps:
  - name: Check keyphrase doesn't appear too often
    id: keyphrase-check
    uses: skills/action-keyphrase-checker@v1
    with:
      text-file: 'docs/content.md'
      keyphrase: 'amazing'
      maximum-occurrences: 3

Range Validation (Both Min and Max)

steps:
  - name: Check keyphrase appears in acceptable range
    id: keyphrase-check
    uses: skills/action-keyphrase-checker@v1
    with:
      text-file: 'docs/content.md'
      keyphrase: 'GitHub'
      minimum-occurrences: 2
      maximum-occurrences: 5

Exact Occurrences Check

steps:
  - name: Check for exact number of occurrences
    id: keyphrase-check
    uses: skills/action-keyphrase-checker@v1
    with:
      text-file: 'docs/content.md'
      keyphrase: 'TODO'
      minimum-occurrences: 0
      maximum-occurrences: 0

Inputs ⚙️

Input Description Required Default
text-file Path to a file containing text to check No* -
text Direct text input to check No* -
keyphrase The phrase to search for in the text Yes -
case-sensitive Whether to perform case-sensitive matching No false
minimum-occurrences Minimum number of occurrences required for success No 1
maximum-occurrences Maximum number of keyphrase occurrences allowed No -

*Note: You must provide exactly one of text-file or text.

Outputs 📤

Output Description
occurrences Number of occurrences of the keyphrase found in the text

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.