Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(actions): invalid link caused by an internal link in reusable #25086

Closed
1 task done
muzimuzhi opened this issue Apr 18, 2023 · 4 comments · Fixed by #25087
Closed
1 task done

docs(actions): invalid link caused by an internal link in reusable #25086

muzimuzhi opened this issue Apr 18, 2023 · 4 comments · Fixed by #25087
Labels
content This issue or pull request belongs to the Docs Content team

Comments

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Apr 18, 2023

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/using-workflows/triggering-a-workflow

What part(s) of the article would you like to see updated?

In https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters-to-target-specific-branches-for-pull-request-events, it reads

If you define both branches/branches-ignore and paths, the workflow will only run when both filters are satisfied.

In another section of the same page https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters-to-target-specific-branches-or-tags-for-push-events, it reads

If you define both branches/branches-ignore and paths, the workflow will only run when both filters are satisfied.

Here the two "paths"

Additional information

This is caused by the use of an internal link in reusable, see line 5 below

[`paths`](#onpushpull_requestpull_request_targetpathspaths-ignore)

If you define both `branches`/`branches-ignore` and [`paths`](#onpushpull_requestpull_request_targetpathspaths-ignore), the workflow will only run when both filters are satisfied.
The `branches` and `branches-ignore` keywords accept glob patterns that use characters like `*`, `**`, `+`, `?`, `!` and others to match more than one branch name. If a name contains any of these characters and you want a literal match, you need to escape each of these special characters with `\`. For more information about glob patterns, see the "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)."

When one reusable is used by different pages, in most cases internal links like [text](#target) will lead to invalid url in at least one of those rendered pages. The correct way is to tell the full path of the target page, like another link in line 7 in snippet above,

[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet)

I'll provide a PR.

@muzimuzhi muzimuzhi added the content This issue or pull request belongs to the Docs Content team label Apr 18, 2023
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 18, 2023
@cmwilson21 cmwilson21 removed the triage Do not begin working on this issue until triaged by the team label Apr 19, 2023
@cmwilson21
Copy link
Contributor

@muzimuzhi Thank you for opening an issue and linking it to your PR! ✨

And thanks for providing all this extra context! 💖

@peterbe
Copy link
Contributor

peterbe commented Apr 20, 2023

I did a search for the pattern of in-page anchor links with the data/reusables/. Wow, there's a lot!
Screenshot 2023-04-20 at 4 08 41 PM-with-shadow

I wonder if we have a lot of these busted in-page anchor links due to this very situation that @muzimuzhi so rightfully spotted.

We currently don't have a link checker for anchor links. It's something we've discussed and will continue to discuss. This issue here certainly helps. Thanks @muzimuzhi !

/CC @sarahs

@muzimuzhi
Copy link
Contributor Author

@peterbe I've reported the general case in #25088.

@Raygrantham51

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants