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
10 changes: 10 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version = 1

[[analyzers]]
name = "javascript"

[analyzers.meta]
plugins = ["react"]

[[transformers]]
name = "prettier"
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
ci:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: yarn

- name: Install dependencies
run: yarn install --immutable --mode=skip-build

- name: Prepare WXT types
run: yarn exec wxt prepare

- name: Build extension
run: yarn build
42 changes: 40 additions & 2 deletions .github/workflows/pr-auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
pull-requests: write
issues: write

jobs:
approve:
Expand Down Expand Up @@ -38,14 +39,51 @@ jobs:
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
GH_TOKEN: ${{secrets.EPLUS_BOT_TOKEN}}

- name: Approve pull request with comment
run: gh pr review --approve "$PR_NUMBER" --body "$APPROVAL_COMMENT" --repo "$GITHUB_REPOSITORY"
- name: Approve pull request
run: |
APPROVED_FOR_HEAD="$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/reviews" \
--paginate \
--jq ".[] | select(.user.login == \"eplus-bot\" and .state == \"APPROVED\" and .commit_id == \"$HEAD_SHA\") | .id" \
| tail -n 1)"

if [ -z "$APPROVED_FOR_HEAD" ]; then
gh pr review --approve "$PR_NUMBER" --repo "$GITHUB_REPOSITORY"
fi
env:
PR_NUMBER: ${{steps.pr.outputs.number}}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
GH_TOKEN: ${{secrets.EPLUS_BOT_TOKEN}}

- name: Upsert CI approval comment
run: |
COMMENT_ID="$(gh api "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \
--paginate \
--jq ".[] | select(.user.login == \"eplus-bot\" and (.body | contains(\"$COMMENT_MARKER\"))) | .id" \
| tail -n 1)"

if [ -n "$COMMENT_ID" ]; then
gh api \
--method PATCH \
"repos/$GITHUB_REPOSITORY/issues/comments/$COMMENT_ID" \
-f body="$APPROVAL_COMMENT"
else
gh api \
--method POST \
"repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \
-f body="$APPROVAL_COMMENT"
fi
env:
PR_NUMBER: ${{steps.pr.outputs.number}}
COMMENT_MARKER: "<!-- eplus-bot-ci-approval -->"
APPROVAL_COMMENT: |
<!-- eplus-bot-ci-approval -->

![CI passed](https://img.shields.io/badge/CI-passed-brightgreen)

Approved by @eplus-bot after CI passed.

Updated: ${{ github.event.workflow_run.updated_at }}
Run attempt: #${{ github.event.workflow_run.run_attempt }}

CI run: ${{ github.event.workflow_run.html_url }}
GH_TOKEN: ${{secrets.EPLUS_BOT_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/pr-closed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🎉 PR closed
name: PR closed

on:
pull_request_target:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ jobs:
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v6
with:
node-version: 22.x
node-version: 24.x
cache: "yarn"

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable --mode=skip-build

- name: Prepare WXT types
run: yarn exec wxt prepare

- name: Build the extension
run: |
Expand All @@ -50,13 +56,11 @@ jobs:
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}

- name: Commit CHANGELOG.md
if: steps.changelog.outcome == 'success'
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: main
Expand All @@ -76,7 +80,7 @@ jobs:
- name: Submit to stores
if: startsWith(github.ref, 'refs/tags/')
run: |
yarn wxt submit \
yarn exec wxt submit \
--chrome-zip .output/*-chrome.zip \
--firefox-zip .output/*-firefox.zip \
--firefox-sources-zip .output/*-sources.zip