#github-api #github #api #tool

app octomate

使用GitHub API自动化任务

1个不稳定版本

0.1.0 2022年5月25日

#55 in #github-api

MIT许可证

21KB
455

Octomate

使用GitHub API自动化任务,运行批量任务以管理GitHub相关事务。

批量文件示例 batch.yml

version: "1.0"

name: My first batch # Optional

jobs:
  - name: "Perform some basics things for some repos" # Optional field
    on-repositories:
      - owner: me
        name: repo1
      - owner: me
        name: repo2

    steps:
      - name: Init labels and create a team # Optional field
        runs:
          - create-label:
              name: test # Optional field
              color: "000000"
              description: "label created by octomate!" # Optional field

          - create-team:
              name: Avengers # Optional field
              description: "My super team of heroes" # Optional field
              owner: me
              maintainers:
                - thor
                - ironman
                - captain

安装

您可以使用git URL安装最新版本的commit。

cargo install --git https://github.com/prx0/octomate

您可以使用--tag选项请求特定的octomate版本。

批量规范

版本 1.0

命令

create-issue

          - create-issue:
              title: "A title for my gist"
              body: >
                Description of the issue,
                blablabla
              milestone: 1 # number, id of the milestone, optional field
              assignees: # List of string, optional field
                - "John doe"
              labels: # List of string, optional field
                - "my-label" # name of the label

create-gist

          - create-gist:
              title: "A title for my gist"
              content: >
                A content for my gist,
                blablabla
              description: "Example of gist" # Optional field
              public: true # Optional field

create-team

          - create-team:
              name: My Team
              description: "A description for the team" # Optional field
              owner: myusername # in string
              maintainers: # a list of string, optional field
                - thor
                - ironman
                - captain

create-label

          - create-label:
              name: "my label"
              color: "000000" # hex color code without the # sign
              description: "A description"

路线图

  • 添加命令行界面
  • [] 添加更多测试

依赖关系

~26–41MB
~802K SLoC