diff --git a/.github/format_pr_body.sh b/.github/format_pr_body.sh new file mode 100755 index 0000000000..df16d70bc8 --- /dev/null +++ b/.github/format_pr_body.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -eux + +# ensure 2 argument is passed +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +PR_NUMBER=$1 +VLLM_VERSION=$2 +VLLM_COMMIT=$3 +OLD=/tmp/orig_pr_body.txt +NEW=/tmp/new_pr_body.txt + +gh pr view --json body --template "{{.body}}" "${PR_NUMBER}" > "${OLD}" +cp "${OLD}" "${NEW}" + +# Remove "FIX #xxxx (*link existing issues this PR will resolve*)" +sed -i '//d' "${NEW}" +sed -i '/- vLLM .*$/d' "${NEW}" +echo "- vLLM version: $VLLM_VERSION" >> "${NEW}" +echo "- vLLM main: $VLLM_COMMIT" >> "${NEW}" + +# Run this only if ${NEW} is different than ${OLD} +if ! cmp -s "${OLD}" "${NEW}"; then + echo + echo "Updating PR body:" + echo + cat "${NEW}" + gh pr edit --body-file "${NEW}" "${PR_NUMBER}" +else + echo "No changes needed" +fi diff --git a/.github/workflows/format_pr_body.yaml b/.github/workflows/format_pr_body.yaml new file mode 100644 index 0000000000..4af55c7f0a --- /dev/null +++ b/.github/workflows/format_pr_body.yaml @@ -0,0 +1,45 @@ +name: Cleanup PR Body + +on: + pull_request_target: + types: [synchronize] + +permissions: + pull-requests: write + +jobs: + update-description: + runs-on: ubuntu-latest + + steps: + - name: Checkout vllm-project/vllm repo + uses: actions/checkout@v4 + with: + repository: vllm-project/vllm + ref: ${{ matrix.vllm_version }} + path: ./vllm-empty + + - name: Get vLLM version + working-directory: ./vllm-empty + run: | + VLLM_COMMIT=$(git rev-parse HEAD) + echo "VLLM_COMMIT=https://github.com/vllm-project/vllm/commit/$VLLM_COMMIT" >> $GITHUB_ENV + + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up Python + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + with: + python-version: '3.12' + + - name: Get vLLM release version + run: | + VLLM_VERSION=$(python3 docs/source/conf.py | jq .vllm_version | tr -d '"') + echo "VLLM_VERSION=$VLLM_VERSION" >> $GITHUB_ENV + + - name: Update PR description + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + bash .github/format_pr_body.sh "${{ github.event.number }}" "${{ env.VLLM_VERSION }}" "${{ env.VLLM_COMMIT }}" diff --git a/vllm_ascend/ascend_config.py b/vllm_ascend/ascend_config.py index c5c4d125d0..3caf30dcec 100644 --- a/vllm_ascend/ascend_config.py +++ b/vllm_ascend/ascend_config.py @@ -1,4 +1,4 @@ -# +# test # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. # This file is a part of the vllm-ascend project. #