Merge pull request #188 from MervinPraison/fix/merge-gate-stash-config

fix(merge-gate): stash gate-config.js with merge-gate.js
This commit is contained in:
Mervin Praison authored and GitHub committed 2026-07-09 16:21:34 +01:00
commit cdd6b21d3b
4 files changed
+24 -16

No files matched your search

+5 -4
View File
@@ -252,8 +252,9 @@ jobs:
- name: Stash merge gate helpers
run: |
cp .github/scripts/merge-gate.js /tmp/merge-gate.js
mkdir -p /tmp/gh-actions
# Keep scripts together so require('./gate-config.js') works from /tmp
mkdir -p /tmp/merge-gate-scripts /tmp/gh-actions
cp .github/scripts/merge-gate.js .github/scripts/gate-config.js /tmp/merge-gate-scripts/
cp -R .github/actions/claude-code-action /tmp/gh-actions/
- name: Fetch PR branch
@@ -321,7 +322,7 @@ jobs:
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const mergeGate = require('/tmp/merge-gate.js');
const mergeGate = require('/tmp/merge-gate-scripts/merge-gate.js');
const owner = context.repo.owner;
const repo = context.repo.repo;
const prNumber = ${{ matrix.pr_number }};
@@ -360,7 +361,7 @@ jobs:
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const mergeGate = require('/tmp/merge-gate.js');
const mergeGate = require('/tmp/merge-gate-scripts/merge-gate.js');
const comments = await mergeGate.listAllComments(
github, context.repo.owner, context.repo.repo, ${{ matrix.pr_number }}
);
+1 -1
View File
@@ -1,3 +1,3 @@
"""Version information."""
__version__ = "0.3.124"
__version__ = "0.3.127"
+9 -9
View File
@@ -12,9 +12,9 @@ def test_feature_registry_basic():
assert registry.is_implemented("site")
assert registry.is_implemented("seo")
assert registry.is_implemented("a11y")
# Test experimental features
assert registry.is_experimental("i18n")
# i18n graduated to implemented (since 0.5.0)
assert registry.is_implemented("i18n")
assert not registry.is_experimental("i18n")
# Test non-existent features
assert not registry.is_implemented("nonexistent")
@@ -34,14 +34,14 @@ def test_feature_registry_with_config():
experimental = registry.get_experimental_fields(config)
assert experimental == []
# Config with experimental features
config_with_experimental = Config(
# i18n is now an implemented feature, so it is not reported as experimental
config_with_i18n = Config(
site=SiteConfig(title="Test"),
i18n=I18nConfig(locales=["en", "es"])
)
experimental = registry.get_experimental_fields(config_with_experimental)
assert "i18n" in experimental
experimental = registry.get_experimental_fields(config_with_i18n)
assert "i18n" not in experimental
def test_feature_info():
@@ -55,5 +55,5 @@ def test_feature_info():
i18n_info = registry.get_feature("i18n")
assert i18n_info is not None
assert i18n_info.status == FeatureStatus.EXPERIMENTAL
assert i18n_info.since is None
assert i18n_info.status == FeatureStatus.IMPLEMENTED
assert i18n_info.since == "0.5.0"
+9 -2
View File
@@ -25,18 +25,25 @@ class TestDashboardSessionSearch:
return DASHBOARD_JS.read_text()
def test_ctrl_k_keydown_handler_present(self):
# The Ctrl+K binding is owned by the command palette, which exposes a
# "Search sessions…" entry that routes to openSessionSearch(). Assert the
# UX contract (Ctrl+K reaches session search) rather than where the
# keydown listener physically lives.
src = self._src()
assert "initSessionSearch" in src
m = re.search(
r"function initSessionSearch\(\)\s*\{(.*?)^}",
r"function initCommandPalette\(\)\s*\{(.*?)^}",
src, re.DOTALL | re.MULTILINE,
)
assert m, "initSessionSearch not found"
assert m, "initCommandPalette not found"
body = m.group(1)
assert "keydown" in body
assert "ctrlKey" in body and "metaKey" in body
assert "'k'" in body or '"k"' in body
assert "preventDefault" in body
# The palette must route the "sessions" action to openSessionSearch().
assert "openSessionSearch()" in src
assert "action: 'sessions'" in src or 'action: "sessions"' in src
def test_palette_fetches_sessions_endpoint(self):
src = self._src()