


























@@ -728,10 +728,17 @@ async function applyPullRequestCandidateLabels(github, context, core, pullReques
728728);
729729}
730730731+function isAutomationUser(user, fallbackLogin = "") {
732+const login = user?.login ?? fallbackLogin;
733+return user?.type === "Bot" || /\[bot\]$/i.test(login) || login.startsWith("app/");
734+}
735+731736function isAutomationActor(context) {
732-const sender = context.payload.sender;
733-const login = sender?.login ?? context.actor ?? "";
734-return sender?.type === "Bot" || /\[bot\]$/i.test(login);
737+return isAutomationUser(context.payload.sender, context.actor ?? "");
738+}
739+740+function isGitHubAppPullRequestAuthor(pullRequest) {
741+return isAutomationUser(pullRequest.user);
735742}
736743737744function candidateActionRuleForLabelSet(labelSet, preferredLabel = "") {
@@ -975,6 +982,11 @@ export async function runBarnacleAutoResponse({ github, context, core = console
975982return;
976983}
977984985+if (isGitHubAppPullRequestAuthor(pullRequest)) {
986+await removeLabels(github, context, pullRequest.number, [activePrLimitLabel], labelSet);
987+core.info(`Skipping active PR limit for GitHub App-authored PR #${pullRequest.number}.`);
988+}
989+978990await applyPullRequestCandidateLabels(github, context, core, pullRequest, labelSet);
979991980992if (labelSet.has(dirtyLabel)) {
@@ -1061,7 +1073,10 @@ export async function runBarnacleAutoResponse({ github, context, core = console
10611073if (pullRequest && labelSet.has(activePrLimitOverrideLabel)) {
10621074labelSet.delete(activePrLimitLabel);
10631075}
1064-if (pullRequest && isAutomationPullRequest(pullRequest)) {
1076+if (
1077+pullRequest &&
1078+(isAutomationPullRequest(pullRequest) || isGitHubAppPullRequestAuthor(pullRequest))
1079+) {
10651080await removeLabels(github, context, pullRequest.number, [activePrLimitLabel], labelSet);
10661081}
10671082此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。