Skip to content

implement auto formatting #1528

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

Merged
merged 1 commit into from
Jul 14, 2025
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
18 changes: 14 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,42 @@ assignees: ["sameerasw"]
---

## Describe the bug

A clear and concise description of what the bug is.

## Steps to reproduce

Steps to reproduce the behavior:
1.
2.
3.

1.
2.
3.

## Expected behavior

A clear and concise description of what you expected to happen.

## Actual behavior

Describe what actually happened.

## ZenInternet Backup JSON (optional)

If possible, please attach the JSON file from a ZenInternet backup (found in Advanced Settings of the addon).
*This is optional, but may help with debugging.*
_This is optional, but may help with debugging._

## Zen Browser Version

Please specify the version of the Zen browser you are using:

## Platform

What platform are you using? (e.g., Windows, macOS, Linux, Android, iOS, etc.)

## Website (if applicable)

If this bug relates to a specific website, please provide its URL:

## Additional context

Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/website-theme-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Request your favorite site to be themed and added to the repository so th
title: "[THEME]"
labels: Theme
assignees: sameerasw

---

Provide the website URL
2 changes: 1 addition & 1 deletion .github/workflows/check_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check New Commits and Assign Issues
on:
push:
paths:
- '**.css'
- "**.css"

jobs:
check-commits:
Expand Down
64 changes: 32 additions & 32 deletions .github/workflows/create-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,39 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Calculate Diff
id: diff
run: |
if [ $(git rev-parse --is-shallow-repository) = true ]; then
git fetch --unshallow
fi
if [ $(git rev-list --count HEAD) -gt 1 ]; then
git diff HEAD^ HEAD -- userChrome.css > diff.txt
else
echo "No previous commit to compare." > diff.txt
fi
- name: Calculate Diff
id: diff
run: |
if [ $(git rev-parse --is-shallow-repository) = true ]; then
git fetch --unshallow
fi
if [ $(git rev-list --count HEAD) -gt 1 ]; then
git diff HEAD^ HEAD -- userChrome.css > diff.txt
else
echo "No previous commit to compare." > diff.txt
fi

- name: Read Diff
id: read_diff
run: echo "::set-output name=diff::$(cat diff.txt)"
- name: Read Diff
id: read_diff
run: echo "::set-output name=diff::$(cat diff.txt)"

- name: Create Pre-Release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "pre-release-${{ github.sha }}"
release_name: "Pre-Release ${{ github.sha }}"
body: |
Pre-release for commit ${{ github.sha }}
- name: Create Pre-Release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "pre-release-${{ github.sha }}"
release_name: "Pre-Release ${{ github.sha }}"
body: |
Pre-release for commit ${{ github.sha }}

Changes in userChrome.css:
${{ steps.read_diff.outputs.diff }}
draft: false
prerelease: true
files: userChrome.css
make_latest: true
Changes in userChrome.css:
${{ steps.read_diff.outputs.diff }}
draft: false
prerelease: true
files: userChrome.css
make_latest: true
28 changes: 28 additions & 0 deletions .github/workflows/format_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Format Repository

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
format:
name: Format code
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Run Prettier
uses: creyD/[email protected]
with:
prettier_options: ${{ github.event_name == 'pull_request' && '--check .' || '--write .' }}
commit_message: "gh-actions: format code"
github_token: ${{ secrets.GITHUB_TOKEN }}
58 changes: 29 additions & 29 deletions .github/workflows/issue_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check if comment contains specific text
if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)')
run: |
echo "Comment contains the specified text."
- name: Check if comment contains specific text
if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)')
run: |
echo "Comment contains the specified text."

# Add labels to the issue
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
-d '{"labels":["help wanted", "no account"]}'
# Add labels to the issue
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
-d '{"labels":["help wanted", "no account"]}'

# Unassign the current user from the issue
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-d '{"assignees":["${{ github.actor }}"]}'
# Unassign the current user from the issue
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-d '{"assignees":["${{ github.actor }}"]}'

# Assign the issue creator to the issue
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-d '{"assignees":["${{ github.event.issue.user.login }}"]}'
# Assign the issue creator to the issue
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-d '{"assignees":["${{ github.event.issue.user.login }}"]}'

- name: Add issue to "Need help" status and "No login" priority in project
env:
PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Add issue to project
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \
-d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}'
- name: Add issue to "Need help" status and "No login" priority in project
env:
PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Add issue to project
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \
-d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}'
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deployment

on:
on:
workflow_run:
workflows: ["Update styles.json"] # Match this to the name of your first workflow
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/map-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "16"

- name: Install GitHub CLI
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
run: |
# Extract project ID from the URL
PROJECT_ID=$(echo "${PROJECT_URL}" | grep -oE "projects/[0-9]+" | cut -d'/' -f2)

# Iterate through all issues and add them to the project
for issue_number in $(jq -r '.[].number' all_issues.json); do
issue_data=$(jq ".[] | select(.number == ${issue_number})" all_issues.json)
Expand Down
Loading