Skip to content

Commit a56424a

Browse files
author
Ahmad Nassri
committed
style(lint): correct lint errors
1 parent c17b980 commit a56424a

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
4747
This action will output the following properties:
4848
49+
<!-- markdownlint-capture -->
50+
51+
<!-- markdownlint-disable MD034 -->
52+
4953
| property | example |
5054
|-------------------------------------|------------------------------------------------------------|
5155
| `repository_json` | { ... } **full** JSON object of the current repository |
@@ -54,7 +58,7 @@ This action will output the following properties:
5458
| `repository_full_name` | ahmadnassri/action-metadata |
5559
| `repository_private` | false |
5660
| `repository_html_url` | <https://github.com/ahmadnassri/action-metadata> |
57-
| `repository_description` | get all the repo and event metadata for use in Actions |
61+
| `repository_description` | get all the repository metadata for use in Actions |
5862
| `repository_fork` | false |
5963
| `repository_git_url` | git://github.com/ahmadnassri/action-metadata.git |
6064
| `repository_ssh_url` | <[email protected]>:ahmadnassri/action-metadata.git |
@@ -100,6 +104,8 @@ This action will output the following properties:
100104
| `template_repository_full_name` | ahmadnassri/template-action-composite |
101105
| `template_repository_html_url` | <https://github.com/ahmadnassri/template-action-composite> |
102106

107+
<!-- markdownlint-restore -->
108+
103109
[context]: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
104110

105111
----

docs/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
3939
This action will output the following properties:
4040
41+
<!-- markdownlint-capture -->
42+
<!-- markdownlint-disable MD034 -->
4143
| property | example |
4244
| ----------------------------------- | -------------------------------------------------------- |
4345
| `repository_json` | { ... } **full** JSON object of the current repository |
@@ -46,7 +48,7 @@ This action will output the following properties:
4648
| `repository_full_name` | ahmadnassri/action-metadata |
4749
| `repository_private` | false |
4850
| `repository_html_url` | https://github.com/ahmadnassri/action-metadata |
49-
| `repository_description` | get all the repo and event metadata for use in Actions |
51+
| `repository_description` | get all the repository metadata for use in Actions |
5052
| `repository_fork` | false |
5153
| `repository_git_url` | git://github.com/ahmadnassri/action-metadata.git |
5254
| `repository_ssh_url` | [email protected]:ahmadnassri/action-metadata.git |
@@ -91,3 +93,4 @@ This action will output the following properties:
9193
| `template_repository_name` | template-action-composite |
9294
| `template_repository_full_name` | ahmadnassri/template-action-composite |
9395
| `template_repository_html_url` | https://github.com/ahmadnassri/template-action-composite |
96+
<!-- markdownlint-restore -->

scripts/index.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PROPS_PREFIX[LICENSE]="license"
1414
PROPS_PREFIX[TEMPLATE_REPO]="template_repository"
1515

1616
# props we want to export
17+
# shellcheck disable=SC2034
1718
REPO_PROPS=(
1819
"id"
1920
"name"
@@ -55,6 +56,7 @@ REPO_PROPS=(
5556
"network_count"
5657
)
5758

59+
# shellcheck disable=SC2034
5860
OWNER_PROPS=(
5961
"id"
6062
"login"
@@ -63,12 +65,14 @@ OWNER_PROPS=(
6365
"type"
6466
)
6567

68+
# shellcheck disable=SC2034
6669
LICENSE_PROPS=(
6770
"key"
6871
"name"
6972
"spdx_id"
7073
)
7174

75+
# shellcheck disable=SC2034
7276
TEMPLATE_REPO_PROPS=(
7377
"id"
7478
"name"
@@ -89,7 +93,7 @@ for PREFIX in "${!PROPS_PREFIX[@]}"; do
8993
KEY="${PROPS_PREFIX[$PREFIX]}"
9094
declare -n PROPS_ARRAY=${VARNAME}
9195
for PROP in "${PROPS_ARRAY[@]}"; do
92-
[[ $KEY = "repository" ]] && JQ_KEY="" || JQ_KEY=".${KEY}"
93-
echo ::set-output name=${KEY}_${PROP}::"$(echo $JSON | jq -r ${JQ_KEY}.${PROP})"
96+
[[ $KEY = "repository" ]] && JQ_KEY="" || JQ_KEY=".${KEY}"
97+
echo ::set-output name=${KEY}_${PROP}::"$(echo "${JSON}" | jq -r ${JQ_KEY}.${PROP})"
9498
done
9599
done

0 commit comments

Comments
 (0)