Skip to content

Commit 848dd21

Browse files
authored
chore: add github workflows (#2)
1 parent 418fc2a commit 848dd21

File tree

11 files changed

+202
-45
lines changed

11 files changed

+202
-45
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: []

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: 🐞 Bug report
3+
about: Report an issue
4+
labels: ['s: pending triage', 'c: bug']
5+
---

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discord Chat
4+
url: https://chat.tsky.dev
5+
about: Ask questions and discuss with other users in real time.
6+
- name: Questions & Discussions
7+
url: https://github.com/tsky-dev/tsky/discussions
8+
about: Use GitHub discussions for message-board style questions and discussions.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: 🚀 New feature proposal
3+
about: Propose a new feature
4+
labels: 's: pending triage'
5+
---

.github/renovate.json5

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base", "schedule:weekly", "group:allNonMajor"],
4+
"labels": ["c: dependencies"],
5+
"rangeStrategy": "bump",
6+
"ignoreDeps": [
7+
"vue",
8+
"vue-tsc",
9+
"typescript",
10+
11+
// Intl.Segmenter is not supported in Firefox
12+
"string-length"
13+
],
14+
"packageRules": [
15+
{
16+
"groupName": "devDependencies",
17+
"matchDepTypes": ["devDependencies"],
18+
"rangeStrategy": "bump"
19+
},
20+
{
21+
"groupName": "dependencies",
22+
"matchDepTypes": ["dependencies"],
23+
"rangeStrategy": "replace"
24+
},
25+
{
26+
"groupName": "peerDependencies",
27+
"matchDepTypes": ["peerDependencies"],
28+
"rangeStrategy": "widen"
29+
},
30+
{
31+
"groupName": "engines",
32+
"matchDepTypes": ["engines"],
33+
"rangeStrategy": "replace"
34+
},
35+
{
36+
"groupName": "test",
37+
"matchPackageNames": ["@vitest/coverage-c8", "@vitest/ui", "vitest"]
38+
},
39+
{
40+
"groupName": "lint",
41+
"matchPackageNames": [
42+
"@antfu/eslint-config",
43+
"eslint",
44+
"prettier"
45+
]
46+
},
47+
{
48+
"groupName": "typescript",
49+
"matchPackageNames": ["typescript"]
50+
},
51+
{
52+
"matchDatasources": ["node-version"],
53+
"enabled": false
54+
}
55+
],
56+
"vulnerabilityAlerts": {
57+
"labels": ["c: security"]
58+
}
59+
}

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: ci
2+
3+
permissions: {}
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
workflow_dispatch: {}
13+
merge_group: {}
14+
15+
jobs:
16+
ci:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- run: corepack enable
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: pnpm
26+
27+
- name: 📦 Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: 🧪 Test project
31+
run: pnpm -r test
32+
timeout-minutes: 10
33+
34+
- name: 📝 Lint
35+
run: pnpm -r lint
36+
37+
- name: 📝 Check format
38+
run: pnpm format:check
39+
40+
- name: 💪 Type check
41+
run: pnpm -r test:typecheck
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Semantic Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions: {}
11+
12+
jobs:
13+
main:
14+
permissions:
15+
pull-requests: read # to analyze PRs (amannn/action-semantic-pull-request)
16+
statuses: write # to mark status of analyzed PR (amannn/action-semantic-pull-request)
17+
18+
runs-on: ubuntu-latest
19+
name: Semantic Pull Request
20+
steps:
21+
- name: Validate PR title
22+
uses: amannn/[email protected]
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
{
2-
"name": "tsky-workspace",
3-
"type": "module",
4-
"version": "0.1.0",
5-
"packageManager": "[email protected]",
6-
"license": "MIT",
7-
"homepage": "https://tsky.dev/",
8-
"repository": {
9-
"type": "git",
10-
"url": "git+https://github.com/tsky-dev/tsky.git"
11-
},
12-
"scripts": {
13-
"docs:dev": "pnpm run --filter tsky-docs dev",
14-
"docs:build": "pnpm run --filter tsky-docs build",
15-
"docs:preview": "pnpm run --filter tsky-docs preview",
16-
"docs:test": "pnpm run --filter tsky-docs test"
17-
"format": "biome check --write .",
18-
"lint": "pnpm --filter tsky run lint",
19-
"lint:fix": "pnpm --filter tsky run lint:fix"
20-
},
21-
"devDependencies": {
22-
"@biomejs/biome": "^1.9.4"
23-
}
24-
}
1+
{
2+
"name": "tsky-workspace",
3+
"type": "module",
4+
"version": "0.1.0",
5+
"packageManager": "[email protected]",
6+
"license": "MIT",
7+
"homepage": "https://tsky.dev/",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/tsky-dev/tsky.git"
11+
},
12+
"scripts": {
13+
"docs:dev": "pnpm run --filter tsky-docs dev",
14+
"docs:build": "pnpm run --filter tsky-docs build",
15+
"docs:preview": "pnpm run --filter tsky-docs preview",
16+
"format": "biome check --write .",
17+
"format:check": "biome check",
18+
"lint": "pnpm --filter tsky run lint",
19+
"lint:fix": "pnpm --filter tsky run lint:fix"
20+
},
21+
"devDependencies": {
22+
"@biomejs/biome": "^1.9.4"
23+
}
24+
}

packages/core/eslint.config.mjs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
import antfu from '@antfu/eslint-config';
22

3-
export default antfu();
3+
export default antfu(
4+
{
5+
stylistic: {
6+
semi: true,
7+
},
8+
},
9+
{
10+
rules: {
11+
'perfectionist/sort-named-imports': 'off',
12+
'antfu/if-newline': 'off',
13+
},
14+
},
15+
);

packages/core/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"license": "MIT",
55
"scripts": {
66
"lint": "eslint ./src",
7-
"lint:fix": "eslint ./src --fix"
7+
"lint:fix": "eslint ./src --fix",
8+
"test": "echo \"Error: no test specified\"",
9+
"test:typescript": "tsc --noEmit"
810
},
911
"devDependencies": {
1012
"@antfu/eslint-config": "^3.11.2",

packages/core/src/post.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type {
22
AppBskyFeedGetLikes,
3-
AppBskyFeedGetPosts,
43
AppBskyFeedGetPostThread,
4+
AppBskyFeedGetPosts,
55
AppBskyFeedGetQuotes,
66
AppBskyFeedGetRepostedBy,
77
AppBskyFeedSearchPosts,
88
AppBskyNS,
9-
} from '@atproto/api'
10-
import { Paginator } from './paginate'
9+
} from '@atproto/api';
10+
import { Paginator } from './paginate';
1111

1212
export class Post {
1313
constructor(private instance: AppBskyNS) {}
@@ -19,9 +19,9 @@ export class Post {
1919
params: AppBskyFeedGetPostThread.QueryParams,
2020
options?: AppBskyFeedGetPostThread.CallOptions,
2121
) {
22-
const res = await this.instance.feed.getPostThread(params, options)
22+
const res = await this.instance.feed.getPostThread(params, options);
2323

24-
return res.data
24+
return res.data;
2525
}
2626

2727
/**
@@ -35,10 +35,10 @@ export class Post {
3535
const res = await this.instance.feed.getLikes(
3636
{ cursor, ...params },
3737
options,
38-
)
38+
);
3939

40-
return res.data
41-
})
40+
return res.data;
41+
});
4242
}
4343

4444
/**
@@ -52,10 +52,10 @@ export class Post {
5252
const res = await this.instance.feed.getQuotes(
5353
{ cursor, ...params },
5454
options,
55-
)
55+
);
5656

57-
return res.data
58-
})
57+
return res.data;
58+
});
5959
}
6060

6161
/**
@@ -69,10 +69,10 @@ export class Post {
6969
const res = await this.instance.feed.getRepostedBy(
7070
{ cursor, ...params },
7171
options,
72-
)
72+
);
7373

74-
return res.data
75-
})
74+
return res.data;
75+
});
7676
}
7777

7878
/**
@@ -87,10 +87,10 @@ export class Post {
8787
const res = await instance.feed.searchPosts(
8888
{ cursor, ...params },
8989
options,
90-
)
90+
);
9191

92-
return res.data
93-
})
92+
return res.data;
93+
});
9494
}
9595

9696
/**
@@ -101,8 +101,8 @@ export class Post {
101101
posts: string[],
102102
options?: AppBskyFeedGetPosts.CallOptions,
103103
) {
104-
const res = await instance.feed.getPosts({ uris: posts }, options)
104+
const res = await instance.feed.getPosts({ uris: posts }, options);
105105

106-
return res.data.posts
106+
return res.data.posts;
107107
}
108108
}

0 commit comments

Comments
 (0)