You can now consume the action by referencing the v1 branch
uses: albertsmit/sitecite@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
urlfield: "link"
textfield: "quote"
path: "./data/quotes.json"
failOnNotFound: true
Input | Type | Required | Default |
---|---|---|---|
token |
string | true |
null |
urlfield |
string | true |
link |
textfield |
string | true |
quote |
path |
string | true |
./sitecite.json |
failOnNotFound |
boolean | false |
false |
Output | Type | Description |
---|---|---|
failures |
boolean | Wether any quote has been failed to be found |
results |
array | The actual results as found in the PR comment |
The expected JSON format is as follows.
Sitecite looks for a quotes
key in the root of the provided JSON.
Then, from that array, it takes the data from these keys:
- URL key from your
urlfield
input/key. - Quote key from your
textfield
input/key.
{
"quotes": [
{
"link": "https://policies.google.com/terms?hl=en",
"quote": "respect the rights of others"
},
{
"link": "https://www.apple.com/legal/internet-services/itunes/us/terms.html",
"quote": "Please carefully read the information presented"
}
]
}
This means that if, for instance, your:
urlfield
istomato
, and- your
textfield
istextgoeshere
sitecite will look for this:
"quotes": [
{
"tomato": "https://www.url-goes-here.io",
"textgoeshere": "Guess what goes here! Woohoo!"
}
]
Credit where credit is due! Thanks for some functions ❤️