Files
dify-docs/.github/workflows
Gu ed65f2c21c Fix workflow failure when PR is force-pushed
When a PR is force-pushed, github.event.before points to an orphaned
commit that isn't fetched by actions/checkout. This caused the workflow
to fail with "Error: command not found" (exit code 127) because:

1. pr_analyzer.py's git diff failed on the inaccessible commit
2. Error messages went to stdout, breaking the source command

This fix:
- Validates COMPARE_BASE accessibility before use via git cat-file
- Falls back to merge-base strategy if commit is orphaned
- Sends error messages to stderr for defensive error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 18:21:53 -08:00
..