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] Update all links to developer.github.com in docs and code comments to the more accurate docs.github.com #2474

Closed
nickfloyd opened this issue Jul 11, 2022 · 3 comments
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@nickfloyd
Copy link
Contributor

It's been a while since we've updated the documentation for octokit.net (*.md). The hostname for the docs site on GitHub has since changed from developer.github.com to docs.github.com so all of the references need to change given the redirects might not always be there and might not currently be accurate.

Things to watch out for:

  • This also includes the v3 URI segment - in most cases that can be removed for docs
  • There are close to 4000 lines that have a string segment of developer.github.com/v3 - most of them currently redirect property but we'll need to be more cautious around the more complex URLs
  • Make sure to sanitize out localization - en, https://docs.github.com/en/rest/issues should be https://docs.github.com/rest/issues etc... the docs site should handle all of that
@SeanKilleen
Copy link
Contributor

Planning this task a little more.

The below powershell script tells me there are 1928 unique URLs containing developer.github.com in the project.

Get-ChildItem -Path *.cs -Recurse | Select-String -Pattern '(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])' | Foreach-Object { $_.matches.Value } | Where-Object { $_ -Match "developer.github.com" } | Get-Unique | Measure-Object

So I exported a text file:

Get-ChildItem -Path *.cs -Recurse | Select-String -Pattern '(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])' | Foreach-Object { $_.matches.Value } | Where-Object { $_ -Match "developer.github.com" } | Get-Unique >> links.txt

And I put that into Excel, which I'm linking here: https://1drv.ms/x/s!AuaqsrDoMOUHofFGQlnoE6jKbcuxHg?e=v7JX7a

I'm thinking the next step would be to do some quick analysis to see if there's a systemic way to approach it, or at least use the Excel file to create a checklist to break things down.

@JonruAlveus
Copy link
Collaborator

Nice! How about this for a starter

  • Ensure https
  • Replace developer.github.com with docs.github.com
  • Remove v3
  • Change help.github.com (are these still valid)?
    Perhaps at this point re-assess what we've got and identify all the links in the code-base and test for validity. If we can see which are invalid, which are redirects and which are valid we can come up with the next steps?

@nickfloyd nickfloyd added Type: Documentation Improvements or additions to documentation Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR Status: Up for grabs Issues that are ready to be worked on by anyone and removed category: docs-and-samples labels Oct 27, 2022
@nickfloyd nickfloyd moved this to 🔥 Backlog in 🧰 Octokit Active Dec 5, 2022
@nickfloyd nickfloyd added the hacktoberfest Issues for participation in Hacktoberfest label Sep 21, 2023
@nickfloyd nickfloyd removed the hacktoberfest Issues for participation in Hacktoberfest label Jan 4, 2024
Copy link

github-actions bot commented Oct 1, 2024

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Oct 1, 2024
@github-actions github-actions bot closed this as completed Oct 9, 2024
@github-project-automation github-project-automation bot moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Active Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Documentation Improvements or additions to documentation Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
Archived in project
Development

No branches or pull requests

3 participants