diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 73842d3c..a58fc84d 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -5,8 +5,29 @@ on: workflow_dispatch: jobs: + check-formatting: + runs-on: ubuntu-latest + name: Check Formatting + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-node@v6 + with: + node-version: ${{ vars.NODE_VERSION }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run prettier + run: npm run format:check + build-and-test: runs-on: ubuntu-latest + strategy: + matrix: + jj_version: ['v0.37.0', 'v0.42.0'] + name: Build and Test (jj ${{ matrix.jj_version }}) steps: - uses: actions/checkout@v6 @@ -19,9 +40,9 @@ jobs: node-version: ${{ vars.NODE_VERSION }} cache: 'npm' - - name: Install jj (Jujutsu) + - name: Install jj ${{ matrix.jj_version }} (Jujutsu) run: | - curl -L https://github.com/jj-vcs/jj/releases/download/v0.37.0/jj-v0.37.0-x86_64-unknown-linux-musl.tar.gz -o jj.tar.gz + curl -L https://github.com/jj-vcs/jj/releases/download/${{ matrix.jj_version }}/jj-${{ matrix.jj_version }}-x86_64-unknown-linux-musl.tar.gz -o jj.tar.gz tar -xzf jj.tar.gz sudo mv jj /usr/local/bin/ rm jj.tar.gz # Clean up large file before jj init @@ -40,3 +61,10 @@ jobs: run: | Xvfb :99 -screen 0 1280x1024x24 & npm test + + presubmit-ok: + runs-on: ubuntu-latest + needs: [check-formatting, build-and-test] + if: always() + steps: + - run: ${{!contains(needs.*.result, 'failure')}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0846d325..e2476b6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,10 @@ ## 0.0.12 -* adds compact mode by @sesceu in https://github.com/sbarfurth/ukemi/pull/51 -* bugfix: ensure @ is shown even on repos without additional workspaces. by @sesceu in https://github.com/sbarfurth/ukemi/pull/52 -* Use --no-integrate-operation on background queries. by @sbarfurth in https://github.com/sbarfurth/ukemi/pull/55 -* Allow copying file paths in SCM view. by @sbarfurth in https://github.com/sbarfurth/ukemi/pull/58 +- adds compact mode by @sesceu in https://github.com/sbarfurth/ukemi/pull/51 +- bugfix: ensure @ is shown even on repos without additional workspaces. by @sesceu in https://github.com/sbarfurth/ukemi/pull/52 +- Use --no-integrate-operation on background queries. by @sbarfurth in https://github.com/sbarfurth/ukemi/pull/55 +- Allow copying file paths in SCM view. by @sbarfurth in https://github.com/sbarfurth/ukemi/pull/58 **Full Changelog**: https://github.com/sbarfurth/ukemi/compare/0.0.11...0.0.12 diff --git a/package.json b/package.json index 0aca328e..821a16f3 100644 --- a/package.json +++ b/package.json @@ -754,7 +754,8 @@ "check-types": "tsc --noEmit", "lint": "eslint src", "test": "node out/test/run_test.js", - "format": "prettier --write ." + "format": "prettier --write .", + "format:check": "prettier --check ." }, "devDependencies": { "@eslint/js": "10.0.1", diff --git a/src/jj/repository.ts b/src/jj/repository.ts index e53a326a..d0425315 100644 --- a/src/jj/repository.ts +++ b/src/jj/repository.ts @@ -1001,12 +1001,17 @@ export class JJRepository { } async operationLog(): Promise { + // The `tags()` function was deprecated in 0.41.0. + const attributesField = this.jjVersion.isAtLeast(SemVer.parse('0.41.0')) + ? 'self.attributes()' + : 'self.tags()'; + const operationSeparator = '__ඞඞ__\n'; const fieldSeparator = '__ඞ__'; const templateFields = [ 'self.id()', 'self.description()', - 'self.attributes()', + attributesField, 'self.time().start()', 'self.user()', 'self.snapshot()', @@ -1071,7 +1076,7 @@ export class JJRepository { case 'self.description()': op.description = value; break; - case 'self.attributes()': + case attributesField: op.tags = value; break; case 'self.time().start()': diff --git a/src/test/run_test.ts b/src/test/run_test.ts index 4d0d6d7a..95f5d89b 100644 --- a/src/test/run_test.ts +++ b/src/test/run_test.ts @@ -33,10 +33,10 @@ async function main() { cwd: testRepoPath, }); // The initial `jj git init` created an implicit new commit on top of the - // root commit (0). This will have the system git author information since - // we configured the author after. We can recreate on top of root to apply - // the author config from above. - await execJJPromise(`new 0`, { + // root commit (0000...). This will have the system git author information + // since we configured the author after. We can recreate on top of root to + // apply the author config from above. + await execJJPromise(`new 0000`, { cwd: testRepoPath, });