Docs: Add versioning section to README #73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 The kpt Authors | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # Request Copilot review when a PR is opened, reopened, or marked ready for review (non-draft). | |
| # Further reviews can be requested manually via the GitHub UI. | |
| # | |
| # Prerequisite: Disable automatic Copilot code review in repo settings | |
| # (Settings → Copilot → Code review → Disable automatic reviews) | |
| name: Copilot Code Review | |
| on: | |
| pull_request_target: | |
| types: [opened, ready_for_review, reopened] | |
| permissions: {} | |
| jobs: | |
| request-copilot-review: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Request Copilot review | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| with: | |
| script: | | |
| const prNumber = context.payload.pull_request.number; | |
| core.info(`Requesting Copilot review for PR #${prNumber}`); | |
| try { | |
| await github.rest.pulls.requestReviewers({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| reviewers: ['copilot-pull-request-reviewer[bot]'], | |
| }); | |
| core.info(`✅ Copilot review requested for PR #${prNumber}`); | |
| } catch (error) { | |
| if (error.status === 422) { | |
| core.info(`Copilot review already requested or cannot be requested: ${error.message}`); | |
| } else { | |
| throw error; | |
| } | |
| } |