Skip to content

Commit 2cb2daa

Browse files
hesreallyhimclaude
andcommitted
fix: update validate_links.py to use new GitHub Actions output syntax
- Replace deprecated ::set-output with $GITHUB_OUTPUT environment variable - Add fallback for local testing when GITHUB_OUTPUT is not available - Fix error condition to check for newly_broken links instead of total broken This addresses the deprecation warning in GitHub Actions and ensures compatibility with the latest GitHub Actions runner. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8b0abe8 commit 2cb2daa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/validate_links.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,15 @@ def main():
416416

417417
if args.github_action:
418418
# Output JSON for GitHub Action
419-
print("\n::set-output name=validation-results::" + json.dumps(results))
419+
github_output = os.getenv("GITHUB_OUTPUT")
420+
if github_output:
421+
with open(github_output, "a") as f:
422+
f.write(f"validation-results={json.dumps(results)}\n")
423+
else:
424+
print(f"validation-results={json.dumps(results)}")
420425

421426
# Set action failure if broken links found
422-
if results["broken"] > 0:
427+
if results["newly_broken"] > 0:
423428
print(f"\n::error::Found {results['newly_broken']} newly broken links")
424429
sys.exit(1)
425430

0 commit comments

Comments
 (0)