Skip to content

Commit 48c2dfd

Browse files
committed
Release 1.7.8
1 parent dc173fd commit 48c2dfd

712 files changed

Lines changed: 350936 additions & 44335 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/APPROVED_CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GitHub usernames approved for public repo issues/PRs.
2+
# One username per line, without @.
3+
# Maintainers can add users manually or via the approve-contributor workflow.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Journalit Discord
4+
url: https://discord.gg/AkSw3D9h8b
5+
about: Preferred place for support, bug reports, and feature requests.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Contribution or support request
2+
description: Use Discord first unless a maintainer asked you to open an issue here.
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Journalit uses Discord as the preferred support and feedback channel:
8+
https://discord.gg/AkSw3D9h8b
9+
10+
Public GitHub issues may be closed automatically unless a maintainer has approved you or asked you to open one.
11+
- type: textarea
12+
id: summary
13+
attributes:
14+
label: Summary
15+
description: What happened or what are you requesting?
16+
validations:
17+
required: true
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Approve Contributor
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
contents: write
9+
issues: read
10+
pull-requests: read
11+
12+
jobs:
13+
approve:
14+
if: github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Record approved contributor
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
const body = context.payload.comment.body.trim().toLowerCase();
23+
if (body !== 'lgtm' && body !== 'lgtmi') return;
24+
const issue = context.payload.issue;
25+
const user = issue.user.login;
26+
const fs = require('fs');
27+
const path = '.github/APPROVED_CONTRIBUTORS';
28+
const existing = fs.existsSync(path) ? fs.readFileSync(path, 'utf8') : '';
29+
const lines = existing.split(/\r?\n/).map(line => line.trim().toLowerCase());
30+
if (!lines.includes(user.toLowerCase())) {
31+
fs.appendFileSync(path, `${user}\n`);
32+
}
33+
- name: Commit approval
34+
run: |
35+
if git diff --quiet .github/APPROVED_CONTRIBUTORS; then
36+
echo "No approval changes"
37+
exit 0
38+
fi
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
git add .github/APPROVED_CONTRIBUTORS
42+
git commit -m "chore: approve contributor"
43+
git push

.github/workflows/issue-gate.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Issue Gate
2+
3+
on:
4+
issues:
5+
types: [opened, reopened]
6+
7+
permissions:
8+
issues: write
9+
contents: read
10+
11+
jobs:
12+
gate:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Close issues from unapproved contributors
17+
uses: actions/github-script@v7
18+
with:
19+
script: |
20+
const fs = require('fs');
21+
const approvedPath = '.github/APPROVED_CONTRIBUTORS';
22+
const approved = fs.existsSync(approvedPath)
23+
? fs.readFileSync(approvedPath, 'utf8')
24+
.split(/\r?\n/)
25+
.map(line => line.trim().toLowerCase())
26+
.filter(line => line && !line.startsWith('#'))
27+
: [];
28+
const user = context.payload.issue.user.login.toLowerCase();
29+
const authorAssociation = context.payload.issue.author_association;
30+
const trusted = approved.includes(user) || ['OWNER', 'MEMBER', 'COLLABORATOR'].includes(authorAssociation);
31+
if (trusted) return;
32+
await github.rest.issues.createComment({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
issue_number: context.issue.number,
36+
body: 'Thanks for reaching out. Journalit uses Discord as the preferred support and feedback channel: https://discord.gg/AkSw3D9h8b. Public GitHub issues are limited to approved contributors, so this issue is being closed automatically.'
37+
});
38+
await github.rest.issues.update({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
issue_number: context.issue.number,
42+
state: 'closed'
43+
});

.github/workflows/pr-gate.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PR Gate
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
issues: write
10+
contents: read
11+
12+
jobs:
13+
gate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Close pull requests from unapproved contributors
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const fs = require('fs');
22+
const approvedPath = '.github/APPROVED_CONTRIBUTORS';
23+
const approved = fs.existsSync(approvedPath)
24+
? fs.readFileSync(approvedPath, 'utf8')
25+
.split(/\r?\n/)
26+
.map(line => line.trim().toLowerCase())
27+
.filter(line => line && !line.startsWith('#'))
28+
: [];
29+
const pr = context.payload.pull_request;
30+
const user = pr.user.login.toLowerCase();
31+
const authorAssociation = pr.author_association;
32+
const trusted = approved.includes(user) || ['OWNER', 'MEMBER', 'COLLABORATOR'].includes(authorAssociation);
33+
if (trusted) return;
34+
await github.rest.issues.createComment({
35+
owner: context.repo.owner,
36+
repo: context.repo.repo,
37+
issue_number: pr.number,
38+
body: 'Thanks for the contribution. Journalit is public-source for transparency and Obsidian review, but the private repository remains the source of truth. Public pull requests are limited to approved contributors, so this PR is being closed automatically. Please use Discord first: https://discord.gg/AkSw3D9h8b.'
39+
});
40+
await github.rest.pulls.update({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
pull_number: pr.number,
44+
state: 'closed'
45+
});

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Prepare release notes
18+
id: notes
19+
run: |
20+
tag="${GITHUB_REF#refs/tags/}"
21+
changelog="changelog/CHANGELOG_v${tag}.md"
22+
notes_file="RELEASE_NOTES_GENERATED.md"
23+
if [ -f "$changelog" ]; then
24+
cp "$changelog" "$notes_file"
25+
else
26+
printf '# %s
27+
28+
Release artifacts for Journalit %s.
29+
' "$tag" "$tag" > "$notes_file"
30+
fi
31+
echo "NOTES_FILE=$notes_file" >> "$GITHUB_OUTPUT"
32+
33+
- name: Create public release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
tag="${GITHUB_REF#refs/tags/}"
38+
gh release create "$tag" \
39+
--title="$tag" \
40+
--notes-file="${{ steps.notes.outputs.NOTES_FILE }}" \
41+
main.js manifest.json styles.css

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
.cache/
3+
*.log
4+
*.map

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/lang/compressedLocales.generated.ts
2+
3+
src/services/csv/xlsxCompressed.generated.ts

0 commit comments

Comments
 (0)