Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Test the Action
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
test-rsmetacheck:
Expand All @@ -16,7 +18,7 @@ jobs:
# defined in the root of the CURRENT repository.
uses: ./
with:
input: "https://github.com/${{ github.repository }}"
# test with default input (current repository)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

verbose: "true"

- name: Verify outputs generated
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Run RsMetaCheck
uses: your-github-username/rsmetacheck-action@v1
uses: SoftwareUnderstanding/rs-metacheck-action@0.3.1
# optional arguments
with:
# You can pass the repository URL automatically
input: "https://github.com/${{ github.repository }}"
pitfalls_output: "./pitfalls_outputs"
input: https://github.com/$GITHUB_REPOSITORY # if input is omited it will use GITHUB_REPOSITORY url

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
input: https://github.com/$GITHUB_REPOSITORY # if input is omited it will use GITHUB_REPOSITORY url
input: https://github.com/$GITHUB_REPOSITORY # optional. if omitted, the GITHUB_REPOSITORY url will be used

pitfalls_output: "./pitfalls_outputs"
verbose: "false"
```

Expand All @@ -45,6 +45,7 @@ jobs:
| `branch` | Branch of the repository to analyze. | No | |
| `generate_codemeta` | Generate codemeta files for each repository. | No | `false` |
| `verbose` | Include both detected AND undetected pitfalls in the output JSON-LD. | No | `false` |
| `config` | Specify the location of the `rsmetacheck.toml` to define the configuration. RSMetaCheck automatically detects a .rsmetacheck.toml (or rsmetacheck.toml) file at the working directory. | No | `rsmetacheck.toml` |

### Outputs

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ branding:
inputs:
input:
description: 'One or more: GitHub/GitLab URLs, JSON files containing repositories. (e.g. "https://github.com/owner/repo")'
required: true
required: false
default: "https://github.com/${GITHUB_REPOSITORY}"
skip_somef:
description: "Skip SoMEF execution and analyze existing SoMEF output files directly."
required: false
Expand Down
9 changes: 7 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ if [ -n "$INPUT_INPUT" ]; then
# Note: Do not quote $INPUT_INPUT here in case multiple URLs are passed as spaces
CMD="$CMD --input $INPUT_INPUT"
else
echo "Error: The 'input' argument is required."
exit 1
# use the repository URL as the default input if not provided
if [ -n "$GITHUB_REPOSITORY" ]; then
CMD="$CMD --input https://github.com/$GITHUB_REPOSITORY"
else # if github repository url is not existing then return error
echo "Error: The 'input' argument is required."
exit 1
fi
fi

# Handle boolean flags
Expand Down
Loading