mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
enhance: Automatically Close Knowhere Automated PRs (#40498)
Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
This commit is contained in:
parent
6f70e6d1e1
commit
2eaf997dce
24
.github/workflows/update-knowhere-commit.yaml
vendored
24
.github/workflows/update-knowhere-commit.yaml
vendored
@ -25,6 +25,30 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install GitHub CLI
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y gh
|
||||
- name: Close Previous PRs
|
||||
run: |
|
||||
REPO=${{ github.repository }}
|
||||
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
||||
# Set up GitHub CLI authentication non-interactively
|
||||
gh auth login --with-token <<< "${{ secrets.ALL_CONTRIBUTORS_TOKEN }}"
|
||||
|
||||
BRANCH_PREFIX="update_knowhere_commit_"
|
||||
|
||||
prs=$(gh pr list --repo "$REPO" --state open --json number,headRefName --jq ".[] | select(.headRefName | startswith(\"$BRANCH_PREFIX\")) | .number")
|
||||
|
||||
for pr in $prs; do
|
||||
echo "Closing old PR #$pr"
|
||||
gh pr close $pr --repo "$REPO"
|
||||
done
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
|
||||
- name: get knowhere latest commit
|
||||
id: get-knowhere-latest-commit
|
||||
run: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user