Skip to content

Commit

Permalink
make the config url configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kilokang committed Nov 21, 2023
1 parent 5d93bac commit f27c49b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/reusable_repolinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ name: Repolinter Action

on:
workflow_call:
inputs:
config_url:
description: >
A URL to pull the JSON or YAML Repolinter ruleset from. This URL must be accessible
by the actions runner and return raw JSON file on GET.
This option can be used to pull a ruleset from GitHub using the
raw.githubusercontent.com URL (ex. https://raw.githubusercontent.com/aperture-science-incorporated/.github/master/repolinter-newrelic-communityplus.json).

This option is mutually exclusive with config_url. If this option and
config-url are not specified, Repolinter's default ruleset will be used.

Examples of valid configs for our use cases are:
* https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml
* https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-project.yml
required: false
type: string
default: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml

# NOTE: This workflow will ONLY check the default branch!
# Currently there is no elegant way to specify the default
Expand All @@ -28,5 +46,5 @@ jobs:
if: ${{ steps.default-branch.outputs.result == 'true' }}
uses: newrelic/repolinter-action@v1
with:
config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml
config_url: "${{ inputs.config_url }}"
output_type: issue

0 comments on commit f27c49b

Please sign in to comment.