https://github.com/hyperjumptech/procheck
A project convention checker (GitHub Actions)
https://github.com/hyperjumptech/procheck
Last synced: 12 months ago
JSON representation
A project convention checker (GitHub Actions)
- Host: GitHub
- URL: https://github.com/hyperjumptech/procheck
- Owner: hyperjumptech
- License: apache-2.0
- Created: 2020-11-30T03:10:07.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-22T02:04:38.000Z (about 5 years ago)
- Last Synced: 2025-04-17T13:35:57.931Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 215 KB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Procheck
A project convention checker
# What it Does
This action checks for file existence and word existence in a file, using a user-defined configuration. This allows users standardize their many projects using a simple, centralized configurations.
# Example Usage
```
- name: @hyperjumptech/procheck
uses: hyperjumptech/procheck@v1.0.0
with:
repository: '{YOUR_USERNAME}/{YOUR_REPOSITORY_NAME}'
configPath: '{PATH_TO_PROCHECK_JSON}'
githubToken: ${{ secrets.GITHUB_TOKEN }}
```
**NOTE**: You only need Github Token if you're accessing your configurations from private repositories. Set your Github Token here: `https://github.com/settings/tokens`
Set your secrets here: `https://github.com/USERNAME/REPO/settings/secrets`.
# Configuration Example
You can create a `procheck.json` inside your created repository and use it with this action.
## Available Properties
| Properties | Type | Required | Description |
| ---------- | -------- | -------- | --------------------------------------------------- |
| filePath | `string` | **true** | Configuration file path |
| contents | `Array` | false | Array of objects of texts that needs to be included |
In `contents` array object, you only need a `value` key to describe what text should be included in a file.
## Check for file existence
This example shows you how to check if README.md and package.json is exists.
```
[
{
"filePath": "./README.md",
},
{
"filePath": "./package.json",
}
]
```
## Check for file existence with word existence
This example shows you how to check if README.md is exists and has "Procheck" and "A project convention checker" text in the file.
```
[
{
"filePath": "./README.md",
"contents": [
{
"value": "Procheck"
},
{
"value": "A project convention checker"
}
]
}
]
```
# Options
| Options | Required | Description |
| ----------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| repository | true | Your username and your repository name where the configuration resides. e.g `hyperjumptech/procheck-configs` |
| configPath | true | Relative configuration path from repository root e.g `procheck-integration-test/procheck.json` |
| githubToken | false | Github Token to access private repositories |