Skip to content

Commit b9dc913

Browse files
committed
Add support for GitHub actions
1 parent d18c45d commit b9dc913

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

action.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "GitHub CODEOWNERS Validator"
2+
description: "Github action to ensure the correctness of your CODEOWNERS file."
3+
author: "szostok.mateusz@gmail.com"
4+
5+
inputs:
6+
github_access_token:
7+
description: "The GitHub access token. Instruction for creating a token can be found here. If not provided then validating owners functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur."
8+
required: false
9+
10+
github_base_url:
11+
description: "The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. Default: https://api.github.com/"
12+
required: false
13+
14+
github_upload_url:
15+
description: "The GitHub upload URL for uploading files. It is taken into account only when the GITHUB_BASE_URL is also set. If only the GITHUB_BASE_URL is provided then this parameter defaults to the GITHUB_BASE_URL value. Default: https://uploads.github.com/"
16+
required: false
17+
18+
experimental_checks:
19+
description: "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned."
20+
default: ""
21+
required: false
22+
23+
checks:
24+
description: "The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns"
25+
required: false
26+
default: ""
27+
28+
repository_path:
29+
description: "The repository path in which CODEOWNERS file should be validated."
30+
required: false
31+
default: "."
32+
33+
check_failure_level:
34+
description: "Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning"
35+
required: false
36+
37+
not_owned_checker_skip_patterns:
38+
description: "The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2"
39+
required: false
40+
41+
owner_checker_repository:
42+
description: "The owner and repository name. For example, gh-codeowners/codeowners-samples. Used to check if GitHub team is in the given organization and has permission to the given repository."
43+
required: false
44+
default: "${{ github.repository }}"
45+
46+
runs:
47+
using: 'docker'
48+
image: 'docker://mszostok/codeowners-validator@sha256:8016ae44f761344ca86187fe5ed282c96b0b6b9b78d7c82402e2b19a5f9543be'
49+
env:
50+
ENVS_PREFIX: "INPUT"
51+
52+
branding:
53+
icon: "shield"
54+
color: "gray-dark"

0 commit comments

Comments
 (0)