我有一个存储库,其中包含 Dependabot,它会打开版本更新等PR,我希望保留这些内容。
在同一存储库中,我为我的团队编写了GitHub拉取请求操作。
我的问题是,无论我尝试什么,Dependabot都会触发Pull Request操作。
我的PR操作必须在暂存分支的拉取请求上触发,如下所示:
我还尝试过像这样排除 Dependabot 用户:
在同一存储库中,我为我的团队编写了GitHub拉取请求操作。
我的问题是,无论我尝试什么,Dependabot都会触发Pull Request操作。
我的PR操作必须在暂存分支的拉取请求上触发,如下所示:
name: Pull Request
on:
pull_request:
branches:
- staging
根据文档所述,我不能同时使用pull_reuqest和branches_ignore。
迄今为止我尝试过的工作流尝试都没有成功:
name: Pull Request
on:
pull_request:
branches:
- staging
- '!dependabot/**'
name: Pull Request
on:
pull_request:
branches:
- staging
jobs:
Build:
if: github.actor!= 'dependabot-preview[bot]'
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
我还尝试过像这样排除 Dependabot 用户:
if: github.actor!= 'depbot'
希望您能提供有关如何解决这个问题的见解或答案。
谢谢!
github.actor
吗?像这样:- run: echo ${{ github.actor }}
。它会输出什么? - rethabpush
。当它创建PR时,这也可以被视为对你的存储库的推送,这就是我遇到的情况。 - Abel Cheung