Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main << dev #8

Merged
merged 140 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
fcc3642
chore: update binary name for exact project name
async3619 Nov 29, 2022
91c40de
feat(logger): implement basic logger
async3619 Nov 29, 2022
f4d84a7
feat(twitter): implement basic twitter auth logic
async3619 Nov 30, 2022
db9ab2b
feat(twitter): implement collecting follower data feature
async3619 Nov 30, 2022
07f98fb
refactor(core): add basic watching feature through cron
async3619 Nov 30, 2022
9498d91
ci: update project name for codecov configuration
async3619 Dec 1, 2022
8265e55
feat(core): implement (un)follower detection through database
async3619 Dec 2, 2022
17286e7
feat(config): implement basic file-based configuration feature
async3619 Dec 2, 2022
bb5954b
refactor: update type `Fn` for better usage
async3619 Dec 4, 2022
bd7a410
test: add test code for logger utility class
async3619 Dec 4, 2022
40a6db5
refactor(core): use throttle instead of waiting for main task loop
async3619 Dec 4, 2022
e77e2a1
chore: use node built-in watch option instead of `nodemon`
async3619 Dec 4, 2022
f0d726c
test: remove `watchAll` option for jest configuration
async3619 Dec 4, 2022
47d9be4
fix(core): rewrite new follower and unfollower check routine
async3619 Dec 4, 2022
91e1ec4
refactor(core): make fetcher can retry when request throws an error
async3619 Dec 5, 2022
cb4985c
ci: make ci collect coverages
async3619 Dec 5, 2022
2347423
refactor(core): make logger can format string with arguments
async3619 Dec 5, 2022
7ce9f67
test: make test suite not to collect coverages when its not explicitl…
async3619 Dec 5, 2022
a140d65
refactor(core): remove exit handler and cleaning up routine
async3619 Dec 5, 2022
01bd940
chore: add coverage badge on README.md
async3619 Dec 5, 2022
1f3d08a
refactor(core): rename log level from `silly` to `verbose`
async3619 Dec 5, 2022
cd763c9
refactor: reimplement how watcher state saved or loaded
async3619 Dec 5, 2022
c1b3501
test(core): fix logger printed value expectation
async3619 Dec 5, 2022
1e9208d
chore: add required dependency
async3619 Dec 5, 2022
36c11ca
ci: update jest coverage command
async3619 Dec 5, 2022
fd6c4ec
feat(discord): implement discord webhook notifier
async3619 Dec 5, 2022
cefe007
test: fix logger printed value expectation
async3619 Dec 5, 2022
21a2d45
test(core): add test case for `Logger.format` function
async3619 Dec 5, 2022
65f6df9
refactor(core): make logger can style string with new format tokens
async3619 Dec 5, 2022
5ad4bf3
refactor(core): make logger not to log verbose level logs when verbos…
async3619 Dec 5, 2022
9c5c41e
refactor(core): make config file path always to be absolute when give…
async3619 Dec 5, 2022
866b9b6
refactor(watcher): make watcher hash data can be retrieved by its own…
async3619 Dec 5, 2022
75ee061
feat(core): implement basic cli feature
async3619 Dec 5, 2022
a052262
test(core): adjust expectation value for accept error ranges
async3619 Dec 5, 2022
9a6883d
chore: update semantic-release configuration
async3619 Dec 5, 2022
d8733e4
ci: make `main` branch run coverage properly
async3619 Dec 5, 2022
6e5e94f
chore: update package information
async3619 Dec 5, 2022
679a0ea
chore: make pre-releases can be published on `dev` branch
async3619 Dec 5, 2022
b5a154f
ci: remove redundant test ci pipeline
async3619 Dec 5, 2022
bb1b5d9
chore: add required dependency
async3619 Dec 5, 2022
951fafa
chore(📦): 1.0.0-dev.1
semantic-release-bot Dec 5, 2022
c04902b
fix(discord): fix a bug that discord notifier notifies with wrong num…
async3619 Dec 6, 2022
b75ab6a
refactor(twitter): make twitter watcher to use official api client
async3619 Dec 6, 2022
09b987a
refactor(twitter): remove redundant legacy codes
async3619 Dec 6, 2022
c6ee7c1
fix(discord): fix a bug that notification having wrong unfollower count
async3619 Dec 6, 2022
9c94b85
feat(core): implement user detection for users who renaming `displayN…
async3619 Dec 6, 2022
676d063
chore: remove redundant loggings
async3619 Dec 6, 2022
f8e2bb6
feat(discord): notifier now notifies renaming user logs well
async3619 Dec 6, 2022
fbb574c
refactor(core): now it save old `displayName` and `userId` whenever r…
async3619 Dec 6, 2022
6bca5a2
refactor(core): rename user log repository table name
async3619 Dec 6, 2022
18728af
docs: add npm package version into README.md 📦
async3619 Dec 6, 2022
104d5f7
docs: add link to npm badge
async3619 Dec 6, 2022
61a2b91
chore(📦): 1.0.0-dev.2
semantic-release-bot Dec 6, 2022
202b12d
refactor(cli): add short-hand option flag for `--verbose`
async3619 Dec 6, 2022
f3dbc0f
docs: add help text for usage purpose
async3619 Dec 6, 2022
1f9b966
docs: add some description for notifiers and watchers
async3619 Dec 6, 2022
4f39959
docs: add some notifiers on supporting table
async3619 Dec 6, 2022
061e8a9
fix(core): update default configuration to fit to the newest config s…
async3619 Dec 6, 2022
bb8a661
refactor(core): remove console clearing on startup
async3619 Dec 7, 2022
aaade8d
build: add docker image deployment
async3619 Dec 7, 2022
082bac6
ci: make docker deploy only works on tag pushing
async3619 Dec 7, 2022
af51898
chore(📦): 1.0.0-dev.3
semantic-release-bot Dec 7, 2022
ffaffd2
ci: make docker image tagged with proper tag name
async3619 Dec 7, 2022
5f00088
docs: add docker related usage
async3619 Dec 7, 2022
95d58ad
docs: make npm badge show correct versioning of a tag
async3619 Dec 7, 2022
a07e78c
fix(discord): now discord notifier notifies with correct timestamp
async3619 Dec 7, 2022
5102812
docs: change project mascot emoji 🖤
async3619 Dec 7, 2022
bd4095c
fix(core): fix a bug that logger could not applying styles properly
async3619 Dec 7, 2022
b988a98
feat(core): implement update notifying feature
async3619 Dec 7, 2022
aaa3ad3
chore(📦): 1.0.0-dev.4
semantic-release-bot Dec 7, 2022
7c6b0de
feat(github): implement github watcher using GraphQL API
async3619 Dec 7, 2022
6aa7583
ci: add ci step for generating graphql queries related types
async3619 Dec 7, 2022
5565d2d
docs: update project description
async3619 Dec 7, 2022
dd5f76d
refactor: change project mascot emoji from 🐦 to 🦜
async3619 Dec 7, 2022
606da97
refactor: remove whitespace between emojis
async3619 Dec 7, 2022
04ff51f
refactor(core): make `BaseWatcher.doWatch` as default-provided for be…
async3619 Dec 7, 2022
958175f
chore: update graphql-code-generator configuration to point exact path
async3619 Dec 7, 2022
b595fc4
chore: update .eslintignore
async3619 Dec 7, 2022
a270014
chore: add auto-generated typing codes to .eslintignore
async3619 Dec 7, 2022
6eb2d58
chore(📦): 1.0.0-dev.5
semantic-release-bot Dec 7, 2022
57dd929
docs: write documentation for configuration file
async3619 Dec 7, 2022
19dad24
docs: make field name to use correct format
async3619 Dec 7, 2022
c491476
refactor(core): use correct log level when no watcher configuration p…
async3619 Dec 7, 2022
8e9adb5
feat(core): implement `--drop-database` cli option that deletes datab…
async3619 Dec 7, 2022
98cdcf6
feat(core): implement `--database` cli option that can specify databa…
async3619 Dec 7, 2022
4112e49
refactor(core): remove saving watcher states feature
async3619 Dec 7, 2022
1b3cb39
fix(core): fix a bug that application could not catch errors during c…
async3619 Dec 7, 2022
d3e26d2
chore: add some emojis to release note headers
async3619 Dec 7, 2022
754c706
refactor(github): make urql client use `node-fetch` instead of built-…
async3619 Dec 7, 2022
9600827
fix(core): fix a bug that could not catch violating minimum value of …
async3619 Dec 7, 2022
cff879d
chore: remove redundant dependency
async3619 Dec 7, 2022
f21dbba
chore(📦): 1.0.0-dev.6
semantic-release-bot Dec 7, 2022
026f5f6
docs: update usage script and help text
async3619 Dec 7, 2022
84a7278
docs: add docker hub badge
async3619 Dec 7, 2022
c712e96
fix(twitter): remove twitter auth methods that is not working anymore
async3619 Dec 8, 2022
eab3be9
fix(core): fix a bug that logger does not formatting with empty string
async3619 Dec 8, 2022
fbc278f
fix(discord): now discord notifier shows user list with correct link url
async3619 Dec 8, 2022
5b97115
chore(📦): 1.0.0-dev.7
semantic-release-bot Dec 8, 2022
703d676
feat(telegram): implement telegram notifier
async3619 Dec 11, 2022
e9a888c
refactor(watcher): simplify watcher related type codes
async3619 Dec 11, 2022
b3565dc
ci: remove redundant ci pipeline step
async3619 Dec 11, 2022
f12c511
fix(telegram): fix a bug that telegram notifier sending notification …
async3619 Dec 11, 2022
f79b418
refactor: print logo at startup
async3619 Dec 11, 2022
85bc8ca
docs: add description for telegram notifier configuration
async3619 Dec 11, 2022
d97979a
test: correct expected error message to newly formatted error message
async3619 Dec 11, 2022
0a7404f
chore(📦): 1.0.0-dev.8
semantic-release-bot Dec 11, 2022
7b4c7f1
feat(slack): implement slack notifier
async3619 Dec 11, 2022
a8fd508
docs: fix typo
async3619 Dec 11, 2022
00f2464
refactor(telegram): make telegram notification title message having m…
async3619 Dec 11, 2022
c99f9a1
fix(slack): fix a bug that slack notifier sending notification with n…
async3619 Dec 11, 2022
c4177dd
chore(📦): 1.0.0-dev.9
semantic-release-bot Dec 11, 2022
c2863c4
fix(telegram): now telegram notifier not escape for markdown formatting
async3619 Dec 12, 2022
b9b49fe
refactor(telegram): now notifier pushes data with new format instead …
async3619 Dec 12, 2022
6c3c994
refactor: make minimum interval be 10s only at development mode
async3619 Dec 12, 2022
5bb7bfa
chore(📦): 1.0.0-dev.10
semantic-release-bot Dec 12, 2022
5f310a7
refactor: remove redundant logging
async3619 Dec 12, 2022
40bfdf5
fix(core): fix bug that app calling notifiers without any logs
async3619 Dec 12, 2022
3e91e03
chore(📦): 1.0.0-dev.11
semantic-release-bot Dec 12, 2022
3dc63b9
fix(github): fix bug that github api client returns cached result
async3619 Dec 13, 2022
7e77507
chore(📦): 1.0.0-dev.12
semantic-release-bot Dec 13, 2022
6b01a31
feat(core): implement specific user ignoring feature
async3619 Dec 16, 2022
a62870a
refactor(discord): remove redundant log count checking logic
async3619 Dec 16, 2022
cdce1c6
chore(📦): 1.0.0-dev.13
semantic-release-bot Dec 16, 2022
5e53aa9
fix(twitter): now twitter watcher uses actual user id instead of hard…
async3619 Dec 19, 2022
53507b3
refactor(core): make app-overfocused business logics separated into i…
async3619 Dec 20, 2022
1aa7732
chore(📦): 1.0.0-dev.14
semantic-release-bot Dec 20, 2022
dd0c7e3
feat(mastodon): implement mastodon watcher
async3619 Jul 3, 2023
643c056
docs: add mastodon to supported watchers table
async3619 Jul 3, 2023
d149b33
chore(📦): 1.0.0-dev.15
semantic-release-bot Jul 3, 2023
b097f4c
feat(bluesky): implement bluesky watcher
async3619 Jul 3, 2023
5044405
fix(core): fix a bug that could not retrieve old data due to maximum …
async3619 Jul 3, 2023
66b3379
chore(📦): 1.0.0-dev.16
semantic-release-bot Jul 3, 2023
f3ec641
fix(bluesky): use provided users did instead of hard coded one
async3619 Jul 3, 2023
0447655
chore(📦): 1.0.0-dev.17
semantic-release-bot Jul 3, 2023
18e6374
fix(twitter): make twitter watcher to use rettiwt-api package instead…
async3619 Oct 31, 2024
962f542
chore: correct nodejs version for `rettiwt-api` (#5)
async3619 Oct 31, 2024
6d68725
chore(📦): 1.0.0-dev.18
semantic-release-bot Oct 31, 2024
9a8a474
docs: update twitter watcher description (#6)
async3619 Oct 31, 2024
a679f23
feat(instagram): implement instagram watcher (#7)
async3619 Nov 1, 2024
bbdd830
chore(📦): 1.0.0-dev.19
semantic-release-bot Nov 1, 2024
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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/node_modules
/.idea
/.git
/bin
/scripts
/.github
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.git
/dist
/node_modules
/schemas
/src/queries.data.ts
10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
}
21 changes: 8 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev

jobs:
build-and-deploy:
Expand All @@ -14,16 +15,6 @@ jobs:
with:
persist-credentials: false

- name: Cache nextjs build
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]sx?') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-

- name: Cache node_modules
id: node-cache
uses: actions/cache@v2
Expand All @@ -39,7 +30,7 @@ jobs:
- name: Install and Build
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.11.1"

- name: Install yarn
run: |
Expand All @@ -49,6 +40,10 @@ jobs:
run: |
yarn

- name: Generate codes for GraphQL
run: |
yarn codegen

- name: Lint
run: |
yarn lint
Expand All @@ -57,13 +52,13 @@ jobs:
env:
FORCE_COLOR: 3
run: |
yarn test
yarn coverage --ci --verbose --testTimeout=10000

- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: solv
name: cage

- name: Build
run: |
Expand Down
50 changes: 34 additions & 16 deletions .github/workflows/test.yml → .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build and Deploy
name: Docker Image Deploy

on:
push:
branches:
- dev
tags:
- "*"

jobs:
build-and-deploy:
Expand All @@ -14,16 +14,6 @@ jobs:
with:
persist-credentials: false

- name: Cache nextjs build
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]sx?') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-

- name: Cache node_modules
id: node-cache
uses: actions/cache@v2
Expand All @@ -39,7 +29,7 @@ jobs:
- name: Install and Build
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.11.1"

- name: Install yarn
run: |
Expand All @@ -49,6 +39,10 @@ jobs:
run: |
yarn

- name: Generate codes for GraphQL
run: |
yarn codegen

- name: Lint
run: |
yarn lint
Expand All @@ -57,13 +51,37 @@ jobs:
env:
FORCE_COLOR: 3
run: |
yarn test
yarn coverage --ci --verbose --testTimeout=10000

- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: solv
name: cage

- name: Build
run: |
yarn build

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set Environment Variable for Tagging
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build, tag, and push image to Docker Hub
env:
DOCKER_BUILDKIT: 1
GITHUB_OWNER: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.event.repository.name }}
run: |
docker build -t $GITHUB_OWNER/$GITHUB_REPO:$RELEASE_VERSION .
docker build -t $GITHUB_OWNER/$GITHUB_REPO:latest .
docker push $GITHUB_OWNER/$GITHUB_REPO:$RELEASE_VERSION
docker push $GITHUB_OWNER/$GITHUB_REPO:latest

- uses: sarisia/actions-status-discord@v1
if: always()
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
/yarn-error.log
/dist
/coverage
/.env
/followers.json
/dump
/data.sqlite
/config.json
/src/queries.ts
/src/queries.data.ts
12 changes: 12 additions & 0 deletions .graphqlconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Untitled GraphQL Schema",
"schemaPath": "./schemas/github.graphqls",
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "https://api.github.com/graphql",
"introspect": false
}
}
}
}
39 changes: 37 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
{
"branches": ["main"],
"branches": ["main", { "name": "dev", "prerelease": true }],
"ci": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalCommits",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features ✨"
},
{
"type": "fix",
"section": "Bug Fixes \uD83D\uDC1E"
},
{
"type": "chore",
"section": "Internal \uD83E\uDDF0",
"hidden": true
},
{
"type": "refactor",
"section": "Internal \uD83E\uDDF0",
"hidden": false
},
{
"type": "perf",
"section": "Internal \uD83E\uDDF0",
"hidden": false
}
]
}
}
],
"@semantic-release/npm",
"@semantic-release/github",
[
Expand Down
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM node:20.18-alpine as builder

RUN apk add --update --no-cache curl git openssh openssl

USER node
WORKDIR /home/node

COPY --chown=node:node package*.json ./
COPY --chown=node:node yarn.lock ./
RUN yarn install --frozen-lockfile

COPY --chown=node:node . .

ARG NODE_ENV=production
ARG APP_ENV=production

ENV NODE_ENV ${NODE_ENV}

RUN ["yarn", "build"]

FROM node:20.18-alpine as prod-deps

USER node
WORKDIR /home/node

# copy from build image
COPY --from=builder /home/node/yarn.lock ./yarn.lock
COPY --from=builder /home/node/package.json ./package.json
RUN yarn install --frozen-lockfile --prod

ARG NODE_ENV=production
ARG APP_ENV=production

ENV NODE_ENV ${NODE_ENV}

CMD [ "node", "dist/src/index" ]

FROM node:20.18-alpine as production

USER node
WORKDIR /home/node

# copy from build image
COPY --from=prod-deps /home/node/node_modules ./node_modules
COPY --from=builder /home/node/dist ./dist
COPY --from=builder /home/node/yarn.lock ./yarn.lock
COPY --from=builder /home/node/package.json ./package.json
RUN yarn install --frozen-lockfile --prod

ARG NODE_ENV=production
ARG APP_ENV=production

ENV NODE_ENV ${NODE_ENV}

CMD [ "node", "dist/src/index" ]
Loading
Loading