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

Improved URL checking workflow #112

Merged
merged 5 commits into from
Aug 8, 2024
Merged

Improved URL checking workflow #112

merged 5 commits into from
Aug 8, 2024

Conversation

cordt-sei
Copy link
Contributor

URL Checking Improvements

This updates the docs page URL checking system to be more thorough, efficient, and integrated.

Key areas:

  1. Enhanced URL Checking Script:

    • Improved URL validation
    • Much better reporting
    • Structured JSON output for better integration with GitHub Actions
  2. Configurable Settings:

    • Added MAX_WORKERS constant to control the level of concurrency
    • Use env variable CHECK_PATH to specify dir to check, defaults to './pages/'
  3. Improved Workflow:

    • Sets CHECK_PATH environment variable
    • Automatic creation of issue if any errors present [once weekly automated check remains]
    • Parses JSON output from the script for more detailed and structured reporting
    • Dynamic issue titling and content based on check results
    • Added 'url-check' label to created issues
  4. Custom 404 Page Handling:

    • Detects redirect to internal 404 page
    • Reports these as broken links even though they return a 200 status code

Implementation Notes

  • Script now produces JSON output
  • Workflow uses ${{secrets.GITHUB_TOKEN}} for issue creation
  • Each check run creates a new issue with a detailed breakdown of results, if any are found
  • The exit code of the script is the number of issues found

Improve efficiency and results reporting
Moves 'check_path' variable to workflow rather than the script itself.
adds several improvements
   - Concurrent processing
   - Improved URL validation
   - Handling for internal 404 page redirects
   - Improved results reporting
Adds automatic issue creating for any problems found
Further imrpoved reporting logic
@cordt-sei cordt-sei requested a review from a team as a code owner August 7, 2024 17:07
@cordt-sei cordt-sei merged commit 21fb412 into main Aug 8, 2024
1 check passed
@cordt-sei cordt-sei deleted the workflows-1 branch August 8, 2024 00:46
@cordt-sei cordt-sei restored the workflows-1 branch August 8, 2024 01:11
cordt-sei added a commit that referenced this pull request Aug 8, 2024
Merge pull request #112 from sei-protocol/workflows-1
seiyan-writer pushed a commit that referenced this pull request Jan 9, 2025
seiyan-writer pushed a commit that referenced this pull request Jan 9, 2025
Merge pull request #112 from sei-protocol/workflows-1
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.

2 participants