【发布时间】:2022-10-24 15:03:35
【问题描述】:
我注意到我在开源项目中实现的自动拉取请求将管理员作为拉取请求之一。理想情况下,如果它是由机器人打开的,那么 github-actions 应该是打开拉取请求的人。
这使操作对每个人都更加透明。我还没有想出如何改变它。
【问题讨论】:
标签: github bots github-actions pull-request
我注意到我在开源项目中实现的自动拉取请求将管理员作为拉取请求之一。理想情况下,如果它是由机器人打开的,那么 github-actions 应该是打开拉取请求的人。
这使操作对每个人都更加透明。我还没有想出如何改变它。
【问题讨论】:
标签: github bots github-actions pull-request
我建议使用create-pull-request 操作。这是一个例子:
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make changes to pull request
run: date +%s > report.txt
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
commit-message: Update report
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: example-patches
delete-branch: true
title: '[Example] Update report'
body: |
Update report
- Updated with *today's* date
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
report
automated pr
assignees: peter-evans
reviewers: peter-evans
team-reviewers: |
owners
maintainers
milestone: 1
draft: false
这是一个演示:
【讨论】: