Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

Limit dependency follow-up commits and repeated reports

Manav Rathi87f9bbac69cd
diff --git a/.github/scripts/dependencies.md b/.github/scripts/dependencies.md
index 297b158e0e..b046c2f134 100644
--- a/.github/scripts/dependencies.md
+++ b/.github/scripts/dependencies.md
@@ -12,4 +12,4 @@ Validate the changes with relevant builds and tests. Where existing coverage is
Keep the updates we can confidently accept. Leave out those requiring a human decision or further work, without blocking independent updates.
-The harness commits your changes and posts your final response as a PR comment. For each dependency, explain why it was accepted or withheld, link the supporting release notes or source, and state what was verified. If there’s nothing new to do or report, return an empty final response; the harness skips empty responses.
+The harness commits your changes and posts your final response as a PR comment. In your first report, for each dependency, explain why it was accepted or withheld, link the supporting release notes or source, and state what was verified. On follow-ups, report only new findings, changes, or validation results. If there’s nothing new to do or report, return an empty final response; the harness skips empty responses.
diff --git a/.github/workflows/dependabot-follow-up.yml b/.github/workflows/dependabot-follow-up.yml
index e26f236ed6..bb189f04db 100644
--- a/.github/workflows/dependabot-follow-up.yml
+++ b/.github/workflows/dependabot-follow-up.yml
@@ -46,7 +46,12 @@ jobs:
comments.some(comment => comment.user.login !== "ente-agent[bot]" && comment.created_at > since &&
(["OWNER", "MEMBER", "COLLABORATOR"].includes(comment.author_association) ||
comment.user.login === "github-actions[bot]"))) {
- selected.push({ number: pr.number, head: pr.head.sha, reviewOnly: pr.head.ref.startsWith("dependabot/github_actions/") });
+ const commits = await github.paginate(github.rest.pulls.listCommits, {
+ ...repo, pull_number: pr.number, per_page: 100,
+ });
+ const reviewOnly = pr.head.ref.startsWith("dependabot/github_actions/") ||
+ commits.filter(commit => commit.author?.login === "ente-agent[bot]").length >= 3;
+ selected.push({ number: pr.number, head: pr.head.sha, reviewOnly });
}
}
return selected;
@@ -169,6 +174,7 @@ jobs:
env:
PR_NUMBER: ${{ matrix.pr.number }}
PR_HEAD: ${{ matrix.pr.head }}
+ REVIEW_ONLY: ${{ matrix.pr.reviewOnly }}
with:
github-token: ${{ steps.app.outputs.token }}
script: |
@@ -183,7 +189,7 @@ jobs:
!/^dependabot\/(cargo|github_actions)\//.test(pr.head.ref)) return;
const result = `${process.env.RUNNER_TEMP}/result`;
const report = readFileSync(`${result}/report.md`, "utf8").trim();
- if (pr.head.ref.startsWith("dependabot/cargo/") && readFileSync(`${result}/changes.patch`).length) {
+ if (process.env.REVIEW_ONLY === "false" && readFileSync(`${result}/changes.patch`).length) {
git("apply", "--index", `${result}/changes.patch`);
const { data: bot } = await github.rest.users.getByUsername({ username: "ente-agent[bot]" });
git("config", "user.name", bot.login);