Skip to content

Commit 536cacb

Browse files
authored
feat: add NGSI-LD scope/scopeQ support (#110)
* feat: add NGSI-LD scope/scopeQ support (#109) Add --scope-q option to entities list for hierarchical scope filtering, display scope property in table output, and update geonicdb to v0.2.1. * fix: update e2e hooks for geonicdb v0.2.1 API changes User creation endpoint now expects primaryTenantId instead of tenantId. * fix: address review comments — CHANGELOG PR number and object array handling * chore: pin geonicdb to commit hash and add weekly compatibility check Pin geonicdb dependency to specific commit (326b12a) to prevent unexpected breakage from upstream changes. Add scheduled CI workflow that tests against latest geonicdb weekly and creates an issue on failure. * fix: add permissions block and fix heredoc variable expansion in compat workflow * docs: update CHANGELOG with CI and dependency pinning entries
1 parent eb249f2 commit 536cacb

10 files changed

Lines changed: 3803 additions & 1681 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: GeonicDB compatibility check
2+
3+
on:
4+
schedule:
5+
- cron: "0 9 * * 1" # 毎週月曜 09:00 UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
12+
jobs:
13+
check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/create-github-app-token@v1
17+
id: app-token
18+
with:
19+
app-id: ${{ secrets.GH_APP_ID }}
20+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
21+
owner: geolonia
22+
repositories: geonicdb
23+
24+
- uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
27+
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
32+
- name: Configure git for private repos
33+
run: |
34+
git config --global url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "https://github.com/"
35+
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "ssh://git@github.com/"
36+
git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "git@github.com:"
37+
38+
- name: Update geonicdb to latest
39+
run: |
40+
node -e "
41+
const p = require('./package.json');
42+
p.devDependencies.geonicdb = 'github:geolonia/geonicdb';
43+
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
44+
"
45+
npm install
46+
47+
- name: Show updated version
48+
run: npm ls geonicdb
49+
50+
- run: npm run lint
51+
- run: npm run typecheck
52+
- run: npm test
53+
- run: npm run test:e2e
54+
55+
- name: Create issue on failure
56+
if: failure()
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
run: |
60+
GEONICDB_VERSION=$(npm ls geonicdb --json 2>/dev/null | node -e "
61+
const d = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
62+
const dep = d.dependencies?.geonicdb;
63+
console.log(dep?.version ?? 'unknown');
64+
")
65+
gh issue create \
66+
--title "geonicdb 最新版 (${GEONICDB_VERSION}) との互換性エラー" \
67+
--body "$(cat <<EOF
68+
## 概要
69+
70+
週次の互換性チェックで、geonicdb の最新版でテストが失敗しました。
71+
72+
- **geonicdb version**: ${GEONICDB_VERSION}
73+
- **Workflow run**: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
74+
75+
## 対応
76+
77+
1. Workflow run のログを確認し、破壊的変更の内容を特定
78+
2. CLI 側のコードを修正
79+
3. `package.json` の geonicdb コミットハッシュを最新に更新
80+
EOF
81+
)"

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
## [Unreleased]
99

10+
### 2026-04-24
11+
- **Feat**: `entities list``--scope-q` オプションを追加 — NGSI-LD `scopeQ` パラメータによるスコープフィルタリングに対応 (#110)
12+
- **Feat**: テーブル表示で `scope` プロパティを `id`, `type` の直後に表示 (#110)
13+
- **Feat**: `entities create` のヘルプに `scope` プロパティの使用例を追加 (#110)
14+
- **CI**: geonicdb 週次互換性チェックワークフローを追加 (#110)
15+
- **Refactor**: devDependency `geonicdb` をコミットハッシュでピン留めに変更 (#110)
16+
1017
## [0.12.1] - 2026-04-14
1118

1219
### 2026-04-14

0 commit comments

Comments
 (0)