lycheeverse / lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
https://lychee.cli.rs
Apache License 2.0
292 stars 39 forks source link

Add default GitHub token #195

Closed jawnsy closed 1 year ago

jawnsy commented 1 year ago

If you define an action input for the GitHub token, you can include it by default, so that users don't need to write boilerplate like:

env:
  GITHUB_TOKEN: ${{ github.token }}

For an example, see https://github.com/styfle/cancel-workflow-action/blob/034d0e91921de4e82c4b8c958df266ca615543e8/action.yml#L15-L18 and https://github.com/peter-evans/create-issue-from-file/blob/ba0d2ca88c3d42f4e20ad4f1018fdb100f250b42/action.yml#LL4C1-L6C33

mre commented 1 year ago

Interesting! I did not know that. Can you take a look at #196 to see if it looks fine?

jawnsy commented 1 year ago

Looks good to me! I don't know if there's a way to check that lychee is actually picking up the token (e.g. with verbose logging or similar), that would be the only thing I'd suggest just to make sure everything is working as we think it is :)