[英]How to disable or ignore Dependabot pull requests?
我們想使用 Dependabot 來了解更新的依賴項,但我們不希望 Dependabot 自己創建拉取請求,也不希望自動構建(我們使用 GitHub 代碼,Azure DevOps 構建)。
文檔 ( https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions ) 中沒有明確的提示來執行此操作。 我們已經嘗試排除 dependabot 分支,但這在任何形式下都不起作用。
# Azure DevOps Excludes
pr:
autoCancel: "true"
branches:
exclude:
- dependabot/*
- dependabot/**/*
我們還在 Stack Overflow 上找到了將限制設置為 0 的提示,但仍然創建了 PR
version: 2
updates:
- directory: "/"
open-pull-requests-limit: 0
是否有可能將 Dependabot 用作信息源?
默認情況下, Dependabot
將自動重置拉取請求以解決任何沖突。 如果您更喜歡手動處理合並沖突,您可以使用rebase-strategy
選項禁用此功能。
對於變基策略,使用disabled
禁用自動變基。
設置此選項還將影響對此包管理器清單文件的安全更新的拉取請求,除非您使用target-branch
檢查非默認分支上的版本更新。
對於rebase-strategy
示例,
version: 2
updates:
- directory: "/"
schedule:
interval: "daily"
# Disable Dependabot pull requests
rebase-strategy: "disabled"
Go 到 Security -> Dependabot -> Configure -> Manage Repository Vulnerability Settings。 (這應該會帶您到 URL,例如https://github.com/yourusername/yourreponame/settings/security_analysis 。)
啟用“Dependabot 警報”設置,但確保禁用“Dependabot 版本更新”設置。
如果您之前啟用了“Dependabot 版本更新”,您的存儲庫中將有一個.github/dependabot.yml
文件,其目的是配置 Dependabot 的自動更新。 要禁用它們,請刪除dependabot.yml
。
在圖片中:
您現在仍然可以在 GitHub 上查看有關您的依賴項的安全警報,但 Dependabot 不會為它們打開 PR。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.