Repository navigation
Upgrade link-check to 0.12 - #271
Conversation
Link Check ReportThere were no links to check! |
| @@ -0,0 +1,12 @@ | |||
| module.exports = async ({ github, context }) => { | |||
There was a problem hiding this comment.
given this is used only in one place, is it better to inline it in the yml file instead?
There was a problem hiding this comment.
The only real reason to keep this separate was so that linters and such can more easily read the js used for the action than they could for js inside a yaml string.
It's also currently duplicated across all the sites which isn't ideal, I'm happy to hear any suggestions for a better implementation because it's going to need one soon.
There was a problem hiding this comment.
if it's used a lot across repos, it sounds worth creating a separate actions repo? Something like https://github.com/iterative/get-pr-number. Then usage would be:
- id: pr-number
uses: iterative/get-pr-number@v1
...
- run: echo ${{ steps.pr-number.outputs.result }}Or we could have a mono-repo for actions (https://github.com/iterative/actions):
- id: pr-number
uses: iterative/actions/get-pr-number@v1
...
- run: echo ${{ steps.pr-number.outputs.result }}| body-includes: "<h1 id=\"link-check\">Link Check Report</h1>" | ||
|
|
||
| - name: Create or update comment | ||
| uses: peter-evans/create-or-update-comment@v2 |
There was a problem hiding this comment.
@iterative/cml if this action can update a comment without a user-provided PAT, why can't cml?
There was a problem hiding this comment.
The one thing I could see in the code is that create-or-update-comment gets its octokit through @actions/github's core.getOctokit while CML's GitHub driver gets it through @octokit/rest's Octokit constructor, seemingly in order to add the throttling plugin.
There was a problem hiding this comment.
@casperdcl Different kinds of comments, comment on a commit vs comment on a pr?
There was a problem hiding this comment.
Different kinds of comments
if that's the issue (a commit-comment requires less perms than pr-comment) then shouldn't --pr should fallback to commit-comment + warning rather than just failing?
There was a problem hiding this comment.
There's an action that creates commit comments which, if the docs are to be believed can also take the GHA token
See treeverse/dvc.org#3700 for more info
This will need some improvements, but solves a lot of issues as-is