ci: support dev staging branch and pre-release tags in release workflow (#999)

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-28 14:14:47 +03:00
1 parent 0cdccad855
commit 7bfb6d5c16
9 files changed
+32 -26

No files matched your search

@@ -3,9 +3,9 @@ name: Merge Conflict Detector
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
branches: [main, dev]
push:
branches: [main]
branches: [main, dev]
# Cancel in-progress runs when a new event lands — protects the expensive
# bulk-check path. github.ref is stable per PR (refs/pull/N/merge) AND stable
@@ -125,19 +125,20 @@ jobs:
return;
}
// ── Bulk check all open PRs (push to main event) ───────────
// ── Bulk check all open PRs (push to main/dev event) ───────────
// GitHub usually recomputes mergeable for every open PR at once after a
// push, so most hit the retry loop simultaneously. Batch a few at a time
// with Promise.all to bound wall-clock without hammering the API.
if (context.eventName === 'push') {
const targetBranch = context.ref.replace('refs/heads/', '');
const { data: prs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
base: 'main',
base: targetBranch,
per_page: 100,
});
core.info(`Checking ${prs.length} open PR(s) base on main...`);
core.info(`Checking ${prs.length} open PR(s) based on ${targetBranch}...`);
const CHUNK = 5;
for (let i = 0; i < prs.length; i += CHUNK) {
const batch = prs.slice(i, i + CHUNK);