Skip to content

Commit 6fd8fed

Browse files
committed
Change all inputs from snake_case to kebab-case
1 parent 46af99f commit 6fd8fed

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ Using it can look like this:
88
```yaml
99
- uses: grafbase/schema-check-action@v1
1010
with:
11-
grafbase_access_token: ${{ secrets.GRAFBASE_ACCESS_TOKEN }}
12-
project_ref: tomhoule/grafbase-single-graph-ci-example@main
13-
schema_path: ./sdl.graphql
14-
subgraph_name: products
11+
grafbase-access-token: ${{ secrets.GRAFBASE_ACCESS_TOKEN }}
12+
project-ref: tomhoule/grafbase-single-graph-ci-example@main
13+
schema-path: ./sdl.graphql
14+
subgraph-name: products
1515
```
1616
1717
## Inputs
1818
19-
- `grafbase_access_token` (required): an access token generated on the Grafbase dashboard.
20-
- `project_ref` (required): the project and (optional) branch of the graph to check.
21-
- `schema_path` (required): the file system path to the schema to check (as GraphQL SDL).
19+
- `grafbase-access-token` (required): an access token generated on the Grafbase dashboard.
20+
- `project-ref` (required): the project and (optional) branch of the graph to check.
21+
- `schema-path` (required): the file system path to the schema to check (as GraphQL SDL).
2222

2323
Tip: the easiest way to produce the GraphQL schema for your graph is
2424
`grafbase introspect --dev > api.graphql`. You can run that command in a
25-
workflow step before the action, and pass `schema_path: api.graphql` to this
25+
workflow step before the action, and pass `schema-path: api.graphql` to this
2626
action.
27-
- `subgraph_name`: the name of the subgraph to check, in a federated project.
27+
- `subgraph-name`: the name of the subgraph to check, in a federated project.
2828
This should not be provided if the project is a single graph.
29-
- `slack_incoming_webhook_url` (optional): a Slack [Incoming Webhook] url that
29+
- `slack-incoming-webhook-url` (optional): a Slack [Incoming Webhook] url that
3030
will be called with the errors whenever checks fail. See the [official
3131
tutorial](https://api.slack.com/messaging/webhooks) on how to set up an app
3232
and a webhook URL.

action.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ branding:
55
icon: activity
66
color: green
77
inputs:
8-
grafbase_access_token:
8+
grafbase-access-token:
99
description: A Grafbase API access token. It can be created from the Grafbase dashboard.
1010
required: true
11-
project_ref:
11+
project-ref:
1212
description: "The account, project and (optional) branch of the schema to check against, in the format expected by the grafbase CLI. Example: tomhoule/test-project@main."
1313
required: true
14-
schema_path:
14+
schema-path:
1515
description: The file path of the schema to check, as GraphQL SDL.
1616
required: true
17-
subgraph_name:
17+
subgraph-name:
1818
description: The name of the subgraph to check. Only required in federated projects.
19-
slack_incoming_webhook_url:
19+
slack-incoming-webhook-url:
2020
description: An optional Slack webhook url to post errors to
2121

2222

@@ -26,12 +26,12 @@ runs:
2626
- id: validate-args
2727
shell: bash
2828
env:
29-
SCHEMA_PATH: "${{ inputs.schema_path }}"
29+
SCHEMA_PATH: "${{ inputs.schema-path }}"
3030
run: |
3131
: Handle the inputs.
3232
3333
if [ -z "$SCHEMA_PATH" ]; then
34-
echo "The schema_path input is missing."
34+
echo "The schema-path input is missing."
3535
exit 1
3636
fi
3737
@@ -40,13 +40,13 @@ runs:
4040
exit 1
4141
fi
4242
43-
if [ -z "${{ inputs.grafbase_access_token }}" ]; then
44-
echo "The grafbase_access_token input is missing."
43+
if [ -z "${{ inputs.grafbase-access-token }}" ]; then
44+
echo "The grafbase-access-token input is missing."
4545
exit 1
4646
fi
4747
48-
if [ -z "${{ inputs.project_ref }}" ]; then
49-
echo "The project_ref input is missing."
48+
if [ -z "${{ inputs.project-ref }}" ]; then
49+
echo "The project-ref input is missing."
5050
exit 1
5151
fi
5252
@@ -62,28 +62,28 @@ runs:
6262
- id: check
6363
shell: bash
6464
env:
65-
SCHEMA_PATH: ${{ inputs.schema_path }}
66-
GRAFBASE_ACCESS_TOKEN: ${{ inputs.grafbase_access_token }}
65+
SCHEMA_PATH: ${{ inputs.schema-path }}
66+
GRAFBASE_ACCESS_TOKEN: ${{ inputs.grafbase-access-token }}
6767
run: |
6868
: Perform the check
6969
70-
if [ -n "${{ inputs.subgraph_name }}" ]; then
71-
SUBGRAPH="--subgraph ${{ inputs.subgraph_name }}"
70+
if [ -n "${{ inputs.subgraph-name }}" ]; then
71+
SUBGRAPH="--subgraph ${{ inputs.subgraph-name }}"
7272
else
7373
SUBGRAPH=""
7474
fi
7575
7676
set +e
7777
echo 'check_errors<<STOPHERE' > "$GITHUB_OUTPUT"
78-
npx grafbase check "${{ inputs.project_ref }}" --schema "$SCHEMA_PATH" $SUBGRAPH |& tee >(cat >&2) | jq --slurp --raw-input >> "$GITHUB_OUTPUT"
78+
npx grafbase check "${{ inputs.project-ref }}" --schema "$SCHEMA_PATH" $SUBGRAPH |& tee >(cat >&2) | jq --slurp --raw-input >> "$GITHUB_OUTPUT"
7979
exit_code=${PIPESTATUS[0]}
8080
echo 'STOPHERE' >> "$GITHUB_OUTPUT"
8181
8282
echo "Exiting with status $exit_code"
8383
exit $exit_code
8484
8585
- name: Post check errors to slack
86-
if: inputs.slack_incoming_webhook_url && failure()
86+
if: inputs.slack-incoming-webhook-url && failure()
8787
uses: slackapi/slack-github-action@v1.24.0
8888
with:
8989
payload: |
@@ -107,5 +107,5 @@ runs:
107107
]
108108
}
109109
env:
110-
SLACK_WEBHOOK_URL: ${{ inputs.slack_incoming_webhook_url }}
110+
SLACK_WEBHOOK_URL: ${{ inputs.slack-incoming-webhook-url }}
111111
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 commit comments

Comments
 (0)