mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* ci: restore a PR's handwritten description when an edit resets it to the placeholder Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * ci: restore the handwritten description into the PR's live body Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
name: Keep Handwritten PR Description
|
|
|
|
# Agents that rewrite a PR body from the template reset the author's handwritten description to the
|
|
# placeholder. This puts the author's text back. Fork PRs are skipped because their token cannot edit
|
|
# the PR, and the agents that do this push branches to this repo.
|
|
|
|
on:
|
|
pull_request:
|
|
types: [edited]
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
|
|
|
jobs:
|
|
restore:
|
|
name: Restore handwritten description
|
|
if: github.event.changes.body && github.event.pull_request.head.repo.full_name == github.repository
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: .github/scripts
|
|
- name: Restore the author's text if the edit replaced it with the placeholder
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: python3 .github/scripts/restore_handwritten_description.py
|