Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/update-cli-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,16 @@ jobs:
run: |
gh repo clone kernel/kernel /tmp/kernel-api -- --depth=1

- name: Clone CLI repo and checkout existing branch
- name: Clone CLI repo
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh repo clone kernel/cli /tmp/kernel-cli
cd /tmp/kernel-cli

# Check if the cli-coverage-update branch already exists on remote
if git ls-remote --exit-code --heads origin cli-coverage-update >/dev/null 2>&1; then
if git fetch origin cli-coverage-update 2>/dev/null; then
echo "Branch cli-coverage-update exists, checking it out..."
git fetch origin cli-coverage-update
git checkout cli-coverage-update
# Merge latest main to keep it up to date
git merge origin/main -m "Merge main into cli-coverage-update" --no-edit || true
else
echo "Branch cli-coverage-update does not exist, will create from main"
Expand Down Expand Up @@ -290,10 +287,10 @@ jobs:
# Output Format
After pushing changes, create or update an evergreen PR using gh:

1. Check if a PR already exists for the cli-coverage-update branch:
gh pr list --repo kernel/cli --head cli-coverage-update --json number
1. Check if an open PR already exists for the cli-coverage-update branch:
gh pr list --repo kernel/cli --head cli-coverage-update --state open --json number

2. If PR exists, update it. If not, create a new one.
2. If an open PR exists, update it. If not, create a new one.

If new commands or flags were added:
Title: 'CLI: Update SDK to <version> and add new commands/flags'
Expand Down