Skip to content

Conversation

@Youssef1313
Copy link
Member

Trying to find a good working workflow that detects problem such as the ones being fixed in #20137.

@dotnet-bot dotnet-bot added this to the August 2020 milestone Aug 18, 2020
@Youssef1313
Copy link
Member Author

I can't get either of the two workflows I found to work.

@adegeo Any ideas?

@adegeo
Copy link
Contributor

adegeo commented Aug 19, 2020

Hrm, not sure? But I dont think this would work anyhow. Does the tool check xref links? Those can be put inside of markdown links: [some link text](xref:api-path)

The build system at least tells us of any non HTTP link AFAIK.

@Youssef1313
Copy link
Member Author

Youssef1313 commented Aug 20, 2020

I think xrefs shouldn't be detected as relative link. These actions should only work in relative links. But I can't get them working.

@adegeo
Copy link
Contributor

adegeo commented Aug 21, 2020

relative links are already checked and reported on by the build system.

@Youssef1313
Copy link
Member Author

@adegeo The build system assumes the link to be okay if there is a redirection. My intentional here was to catch these early.

For example, a File called A.md was renamed to B.md. Because the build system knows about the redirection in that json file, it assumes any link to A.md as a correct link. But if we could make any of these workflows work, they should report invalid link for A.md.

I just thought about that when I saw @gewarren PRs that fixes things like that. Thought the process would be easier.

But if there is no way to get these workflows working, we can close this.

@adegeo
Copy link
Contributor

adegeo commented Aug 24, 2020

The way I got the initial snippets testing working to work was doing it in like your fork first. So I think the workflows only trigger when you're working on the branch they are in. So create branch1 with the workflow configured and ready, then do things in branch2 which has a PR into branch1 where the workflow exists. And I think your trigger needs to be on: pull_request not on: push as you want to test the links of the files when a bad PR comes in, not after it's merged.

@Youssef1313
Copy link
Member Author

Youssef1313 commented Aug 24, 2020

@adegeo The work flows indeed was triggered in my fork (they doesn't appear in PR but I can see in my fork). However, they doesn't seem to be doing any good.

One of the workflows (https://github.com/Youssef1313/docs/actions?query=workflow%3A%22Markdown+link+checker%22) passes in 5 minutes, although they should report broken links.

The second one is actually very funny (https://github.com/Youssef1313/docs/actions?query=workflow%3A%22Check+Markdown+links%22), it fails after 6 hours with a timeout 😄

(Am I missing some configuration options? or it's an issue in the workflows themselves)?

@adegeo
Copy link
Contributor

adegeo commented Aug 24, 2020

No idea really.. does the workflow work with PRs checking just the files in it? I would look into how to configure that script. A lot of scripts allow you set them up through properties or env variables.

@Youssef1313
Copy link
Member Author

@adegeo I'll try to play with it in my fork and see if I could get something to work. In the meanwhile, I'll close the PR and re-open if I could get to something working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants