Skip to content

Commit b4e0e7f

Browse files
authored
Merge pull request #1528 from Tetrax-10/auto-formatting
implement auto formatting Thanks a lot for implementing this <3
2 parents 4223405 + be213a0 commit b4e0e7f

12 files changed

+191
-143
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,42 @@ assignees: ["sameerasw"]
77
---
88

99
## Describe the bug
10+
1011
A clear and concise description of what the bug is.
1112

1213
## Steps to reproduce
14+
1315
Steps to reproduce the behavior:
14-
1.
15-
2.
16-
3.
16+
17+
1.
18+
2.
19+
3.
1720

1821
## Expected behavior
22+
1923
A clear and concise description of what you expected to happen.
2024

2125
## Actual behavior
26+
2227
Describe what actually happened.
2328

2429
## ZenInternet Backup JSON (optional)
30+
2531
If possible, please attach the JSON file from a ZenInternet backup (found in Advanced Settings of the addon).
26-
*This is optional, but may help with debugging.*
32+
_This is optional, but may help with debugging._
2733

2834
## Zen Browser Version
35+
2936
Please specify the version of the Zen browser you are using:
3037

3138
## Platform
39+
3240
What platform are you using? (e.g., Windows, macOS, Linux, Android, iOS, etc.)
3341

3442
## Website (if applicable)
43+
3544
If this bug relates to a specific website, please provide its URL:
3645

3746
## Additional context
47+
3848
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/website-theme-request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Request your favorite site to be themed and added to the repository so th
44
title: "[THEME]"
55
labels: Theme
66
assignees: sameerasw
7-
87
---
98

109
Provide the website URL

.github/workflows/check_commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check New Commits and Assign Issues
33
on:
44
push:
55
paths:
6-
- '**.css'
6+
- "**.css"
77

88
jobs:
99
check-commits:

.github/workflows/create-pre-release.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,39 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout repository
15-
uses: actions/checkout@v3
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
1616

17-
- name: Calculate Diff
18-
id: diff
19-
run: |
20-
if [ $(git rev-parse --is-shallow-repository) = true ]; then
21-
git fetch --unshallow
22-
fi
23-
if [ $(git rev-list --count HEAD) -gt 1 ]; then
24-
git diff HEAD^ HEAD -- userChrome.css > diff.txt
25-
else
26-
echo "No previous commit to compare." > diff.txt
27-
fi
17+
- name: Calculate Diff
18+
id: diff
19+
run: |
20+
if [ $(git rev-parse --is-shallow-repository) = true ]; then
21+
git fetch --unshallow
22+
fi
23+
if [ $(git rev-list --count HEAD) -gt 1 ]; then
24+
git diff HEAD^ HEAD -- userChrome.css > diff.txt
25+
else
26+
echo "No previous commit to compare." > diff.txt
27+
fi
2828
29-
- name: Read Diff
30-
id: read_diff
31-
run: echo "::set-output name=diff::$(cat diff.txt)"
29+
- name: Read Diff
30+
id: read_diff
31+
run: echo "::set-output name=diff::$(cat diff.txt)"
3232

33-
- name: Create Pre-Release
34-
id: create_pre_release
35-
uses: actions/create-release@v1
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
with:
39-
tag_name: "pre-release-${{ github.sha }}"
40-
release_name: "Pre-Release ${{ github.sha }}"
41-
body: |
42-
Pre-release for commit ${{ github.sha }}
33+
- name: Create Pre-Release
34+
id: create_pre_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
tag_name: "pre-release-${{ github.sha }}"
40+
release_name: "Pre-Release ${{ github.sha }}"
41+
body: |
42+
Pre-release for commit ${{ github.sha }}
4343
44-
Changes in userChrome.css:
45-
${{ steps.read_diff.outputs.diff }}
46-
draft: false
47-
prerelease: true
48-
files: userChrome.css
49-
make_latest: true
44+
Changes in userChrome.css:
45+
${{ steps.read_diff.outputs.diff }}
46+
draft: false
47+
prerelease: true
48+
files: userChrome.css
49+
make_latest: true

.github/workflows/format_repo.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Format Repository
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
format:
14+
name: Format code
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
ref: ${{ github.head_ref }}
22+
23+
- name: Run Prettier
24+
uses: creyD/[email protected]
25+
with:
26+
prettier_options: ${{ github.event_name == 'pull_request' && '--check .' || '--write .' }}
27+
commit_message: "gh-actions: format code"
28+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/issue_comment.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,36 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Check if comment contains specific text
13-
if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)')
14-
run: |
15-
echo "Comment contains the specified text."
12+
- name: Check if comment contains specific text
13+
if: contains(github.event.comment.body, 'I do not have a login for this website so contributions are welcome. :)')
14+
run: |
15+
echo "Comment contains the specified text."
1616
17-
# Add labels to the issue
18-
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
19-
-H "Accept: application/vnd.github.v3+json" \
20-
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
21-
-d '{"labels":["help wanted", "no account"]}'
17+
# Add labels to the issue
18+
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
19+
-H "Accept: application/vnd.github.v3+json" \
20+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
21+
-d '{"labels":["help wanted", "no account"]}'
2222
23-
# Unassign the current user from the issue
24-
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
25-
-H "Accept: application/vnd.github.v3+json" \
26-
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
27-
-d '{"assignees":["${{ github.actor }}"]}'
23+
# Unassign the current user from the issue
24+
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
25+
-H "Accept: application/vnd.github.v3+json" \
26+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
27+
-d '{"assignees":["${{ github.actor }}"]}'
2828
29-
# Assign the issue creator to the issue
30-
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
31-
-H "Accept: application/vnd.github.v3+json" \
32-
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
33-
-d '{"assignees":["${{ github.event.issue.user.login }}"]}'
29+
# Assign the issue creator to the issue
30+
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
31+
-H "Accept: application/vnd.github.v3+json" \
32+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
33+
-d '{"assignees":["${{ github.event.issue.user.login }}"]}'
3434
35-
- name: Add issue to "Need help" status and "No login" priority in project
36-
env:
37-
PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID
38-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: |
40-
# Add issue to project
41-
curl -X POST -H "Authorization: Bearer $TOKEN" \
42-
-H "Accept: application/vnd.github.v3+json" \
43-
https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \
44-
-d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}'
35+
- name: Add issue to "Need help" status and "No login" priority in project
36+
env:
37+
PROJECT_ID: "USER_PROJECT_ID" # Replace with your project's ID
38+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
# Add issue to project
41+
curl -X POST -H "Authorization: Bearer $TOKEN" \
42+
-H "Accept: application/vnd.github.v3+json" \
43+
https://api.github.com/projects/${PROJECT_ID}/columns/COLUMN_ID/cards \
44+
-d '{"content_id": "${{ github.event.issue.id }}", "content_type": "Issue"}'

.github/workflows/jekyll-gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
22
name: Deployment
33

4-
on:
4+
on:
55
workflow_run:
66
workflows: ["Update styles.json"] # Match this to the name of your first workflow
77
types:

.github/workflows/map-issues.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Node.js
1919
uses: actions/setup-node@v3
2020
with:
21-
node-version: '16'
21+
node-version: "16"
2222

2323
- name: Install GitHub CLI
2424
run: |
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
# Extract project ID from the URL
4747
PROJECT_ID=$(echo "${PROJECT_URL}" | grep -oE "projects/[0-9]+" | cut -d'/' -f2)
48-
48+
4949
# Iterate through all issues and add them to the project
5050
for issue_number in $(jq -r '.[].number' all_issues.json); do
5151
issue_data=$(jq ".[] | select(.number == ${issue_number})" all_issues.json)

0 commit comments

Comments
 (0)