首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用github-操作作为自动拉出请求的用户

使用github-操作作为自动拉出请求的用户
EN

Stack Overflow用户
提问于 2022-10-19 08:00:37
回答 1查看 75关注 0票数 1

我注意到,我在开源项目中实现的自动拉请求将admin作为拉请求之一。理想情况下,如果它是由机器人打开的,那么github-actions应该是打开拉请求的那个人。

这使每个人的行动更加透明。我还没有想出如何改变这种状况。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-24 07:03:35

我建议使用创建-拉-请求操作。下面是一个示例:

代码语言:javascript
复制
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

下面是一个演示:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74121830

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档