GitHub 操作来自 API 以创建拉取请求
GitHub Actions get from API to create pull request
有没有办法告诉 GitHub 从提供 JSON 内容的 API 自动创建拉取请求并将其合并到我的项目中?
我想:
- 使用我自己的作品在平台上编辑文件(我控制平台)editors/tools。
- 让 GitHub 请求它 (REST),然后创建 PR 或提交,这样人们就可以与 forks/GitHub 项目管理协作。
- 从GitHub推回平台发布。
3 没问题,但是 2 我什至找不到相关文档。
name: Manual workflow
on:
workflow_dispatch:
jobs:
makefiles:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Getting
uses: fjogeleit/http-request-action@master
id: myRequest
with:
url: 'https://domain/api/file'
method: 'GET'
- name: Show File
run: echo ${{ steps.myRequest.outputs.response }}
- name: Create A File
uses: 1arp/create-a-file-action@0.2
with:
path: 'src'
file: 'foo.bar'
content: ${{steps.myRequest.outputs.response}}
- name: final commit
uses: zwaldowski/git-commit-action@v1
id: git_commit
- name: show
run: echo "${{ steps.git_commit.outputs.sha }}"
有没有办法告诉 GitHub 从提供 JSON 内容的 API 自动创建拉取请求并将其合并到我的项目中?
我想:
- 使用我自己的作品在平台上编辑文件(我控制平台)editors/tools。
- 让 GitHub 请求它 (REST),然后创建 PR 或提交,这样人们就可以与 forks/GitHub 项目管理协作。
- 从GitHub推回平台发布。
3 没问题,但是 2 我什至找不到相关文档。
name: Manual workflow
on:
workflow_dispatch:
jobs:
makefiles:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Getting
uses: fjogeleit/http-request-action@master
id: myRequest
with:
url: 'https://domain/api/file'
method: 'GET'
- name: Show File
run: echo ${{ steps.myRequest.outputs.response }}
- name: Create A File
uses: 1arp/create-a-file-action@0.2
with:
path: 'src'
file: 'foo.bar'
content: ${{steps.myRequest.outputs.response}}
- name: final commit
uses: zwaldowski/git-commit-action@v1
id: git_commit
- name: show
run: echo "${{ steps.git_commit.outputs.sha }}"