ITADN
kerthcet/github-workflow-as-kube
kerthcet/github-workflow-as-kube · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md

github-workflow-as-kube

Latest Release

Commands

This workflow following Kubernetes habits, offering commands:

NameAddRemoveNote
Good First Issue/good-first-issue/remove-good-first-issue
Help/help/remove-help
LGTM/lgtm/lgtm cancel
Approve/approve/approve cancelOnly approvers have the privilege
Hold/hold/unholdPR will not be merged once hold
Category/kind feature/remove-kind featureSupport kinds: feature, cleanup, bug, documentation and so on...
Assignment/assign @somebody/unassign @somebodyWhen @nobody, will assign/unassign to the commenter
Review Request/cc @somebody/uncc @somebodyWhen @nobody, will cc/uncc the commenter
Priority/priority backlog/remove-priority backlogSupport priorities: important-critical-urgent, important-soon, important-longterm, backlog, awaiting-more-evidence
Title/retitle title_nameNo OP
Lifecycle/reopen/closeAuthors and collaborators on the repository can trigger this command
Milestone/milestone v0.0.1/milestone clearCreate the milestone labels manually in advance
Triage/triage needs-information/triage acceptedtriage accepted will remove the needs-triage label
WIP/wip/wip cancel
API Change/kind api-change/remove-kind api-change
ReTest/retestNo OPrerun all the failed tests, use /retest all to rerun all tests

NOTE: PR will be auto-merged once have lgtm, approved and no do-not-merge/* labels and all the workflow checks are passed like the ci tests.

How To Use

To use the workflow, you have to:

  • Provide a OWNERS file, only the approvers have the privilege to tag /approve or /approve cancel
  • Create a class Personal Access Token with one user (you can choose to use Fine-grained tokens as well), the user better to act as a robot in the repo, with the following permissions:
    • repo (Full control of private repositories)
    • workflow (Update GitHub Action workflow files)
    • write:packages (Write access to packages)
    • admin:org (Full control of orgs and teams, read and write org projects, read org hooks, and read org custom properties)
    • admin:repo_hook (Full control of repository hooks)
    • admin:org_hook (Full control of organization hooks)
    • notifications (Read and write access to notifications)
    • write:discussion (Write access to discussions)
    • project (Read and write access to projects)
  • Create a org-level secret under Security->Secrets and variables->Actions->Organization secrets, it should be named of AGENT_TOKEN.
  • Add the token owner, the robot to the repo's Collaborators and teams with Write role, under the Direct access section.
  • Add the init-workflow to your project under the path of .github/workflows/, then run the workflow manually, which will help you finish the setup, like creating necessary labels.
  • Add the workflow to your project under the path of .github/workflows/.

That's it, now you can use the commands to manage your PRs.

Other workflows

We support other workflows as well, you can select as your needed:

  • Golang ci workflow: running golang ci, golang tests. You should provide make test, make test-integration, make test-e2e primitives and do not edit the workflow name.

Roadmap

  • Dispatch reviewers
  • PR review by AI agent.
  • PR size detecting support