Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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')}}
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions src/jj/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,12 +1001,17 @@ export class JJRepository {
}

async operationLog(): Promise<Operation[]> {
// 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()',
Expand Down Expand Up @@ -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()':
Expand Down
8 changes: 4 additions & 4 deletions src/test/run_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
Loading