Skip to content

Commit 91ee20f

Browse files
authored
Merge pull request #2 from z-shell/refactor
[WIP]
2 parents c27b13c + 990defb commit 91ee20f

25 files changed

+571
-58
lines changed

.editorconfig

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,60 @@
1+
# Space or Tabs?
2+
# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
3+
# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script
4+
# https://github.com/editorconfig/editorconfig-defaults/blob/master/editorconfig-defaults.json
5+
#
6+
# 1. What happens when I press the Tab key in my text editor?
7+
# 2. What happens when I request my editor to indent one or more lines?
8+
# 3. What happens when I view a file containing U+0009 HORIZONTAL TAB characters?
9+
#
10+
# Answers:
11+
#
12+
# 1. Pressing the Tab key should indent the current line (or selected lines) one additional level.
13+
# 2. As a secondary alternative, I can also tolerate an editor that,
14+
# like Emacs, uses this key for a context-sensitive fix-my-indentation command.
15+
# 3. Indenting one or more lines should follow the reigning convention, if consensus is sufficiently strong; otherwise,
16+
# I greatly prefer 2-space indentation at each level. U+0009 characters should shift subsequent characters to the next tab stop.
17+
#
118
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
2-
# # Space or Tabs? https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
19+
#
20+
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
21+
# vim: ft=zsh sw=2 ts=2 et
322

423
root = true
524

625
[*]
26+
charset = utf-8
727
indent_style = space
828
indent_size = 2
9-
charset = utf-8
10-
end_of_line = lf
11-
trim_trailing_whitespace = true
1229
insert_final_newline = true
30+
trim_trailing_whitespace = true
31+
32+
[*.sln]
33+
indent_style = tab
1334

14-
[**.{md,rst}]
35+
[*.{md,mdx,rst}]
1536
trim_trailing_whitespace = false
37+
38+
[*.{cmd,bat}]
39+
end_of_line = crlf
40+
41+
[*za-*]
42+
end_of_line = lf
43+
44+
[*.{sh,bash,zsh,fish}]
45+
end_of_line = lf
46+
47+
[Makefile]
48+
indent_style = tab
49+
indent_size = 4
50+
51+
[*.{py,rb}]
52+
indent_size = 4
53+
54+
[*.{go,java,scala,groovy,kotlin}]
55+
indent_style = tab
56+
indent_size = 4
57+
58+
[*.{cs,csx,cake,vb,vbx}]
59+
# Default Severity for all .NET Code Style rules below
60+
dotnet_analyzer_diagnostic.severity = warning
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
disp
2+
kcuu
3+
LBUFFER
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "🐞 Bug report"
2+
description: File a bug report
3+
title: "[bug]: "
4+
labels: ["bug 🐞", "triage 📑"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.
10+
- type: input
11+
id: environment
12+
attributes:
13+
label: Environment
14+
description: >
15+
Please describe your environment e.g: echo "OSTYPE=${OSTYPE} CPUTYPE=$(uname -m) / MACHINE_TYPE=$MACHTYPE ZSH_VERSION=${ZSH_VERSION}"
16+
17+
It may contain any additional information which would help to reproduce the issue.
18+
placeholder: "OSTYPE=linux-gnu CPUTYPE=x86_64 / MACHINE_TYPE=x86_64 ZSH_VERSION=5.8"
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: expected
23+
attributes:
24+
label: Expected behavior
25+
description: "Please describe the expected behavior"
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: current
30+
attributes:
31+
label: Current behavior
32+
description: "Please describe how the bug manifests"
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: reproduce
37+
attributes:
38+
label: Steps to reproduce
39+
description: "Explain the steps required to duplicate the issue"
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: code-snippet
44+
attributes:
45+
label: Code snippet
46+
description: "Please insert your zshrc or just a short code snippet in concern"
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: Aditional information
53+
description: "List any other information that is relevant to your issue. For reports and stats run `zi analytics`"
54+
validations:
55+
required: true
56+
- type: checkboxes
57+
attributes:
58+
label: Self-service
59+
description: |
60+
If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it.
61+
If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else.
62+
options:
63+
- label: I'd be willing to address this documentation request myself.
64+
- type: checkboxes
65+
attributes:
66+
label: Have you read the Contributing Guidelines?
67+
options:
68+
- label: I have read the [Contributing Guidelines](https://github.com/z-shell/community/blob/main/docs/CONTRIBUTING_GUIDELINES.md).
69+
required: true
70+
- type: checkboxes
71+
attributes:
72+
label: Are you familiar with Contributor Covenant Code of Conduct?
73+
options:
74+
- label: I have read the [Contributor Covenant Code of Conduct](https://github.com/z-shell/zi/blob/main/docs/CODE_OF_CONDUCT.md).
75+
required: true
76+
- type: input
77+
id: contact
78+
attributes:
79+
label: Contact Details
80+
description: How can we get in touch with you if we need more info?
81+
placeholder: ex. [email protected]
82+
validations:
83+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
blank_issues_enabled: true
3+
contact_links:
4+
- name: Wiki
5+
url: https://wiki.zshell.dev
6+
about: Knowledge base
7+
- name: Discussions
8+
url: https://discussions.zshell.dev
9+
about: Please ask and answer questions here
10+
- name: Matrix
11+
url: https://matrix.zshell.dev
12+
about: An open network for secure, decentralized communication
13+
- name: Slack
14+
url: https://join.slack.com/t/z-shell/shared_invite/zt-16twpopd2-p08ROUeT2aGZ5njJwysawA
15+
about: Workspace to collaborate, ask and answer questions
16+
- name: Crowdin
17+
url: https://translate.zshell.dev
18+
about: Translation and localization management

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/labeler.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
documentation 📝:
2+
- "docs/**/*.md"
3+
- "community/**/*.md"
4+
- "ecosystem/**/*.md"
5+
dependencies 📦:
6+
- "package.json"
7+
- "pnpm-lock.yaml"
8+
- "yarn.lock"
9+
enhancement ✨:
10+
- "functions/**"
11+
- "src/**"
12+
- "lib/**"
13+
maintenance 📈:
14+
- ".all-contributorsrc"
15+
- ".deepsource.toml"
16+
- ".editorconfig"
17+
- ".gitattributes"
18+
- ".gitignore"
19+
- ".github/CODEOWNERS"
20+
- ".github/*.md"
21+
- ".github/*.yml"
22+
- ".github/*.yaml"
23+
- ".github/*.json"
24+
- ".markdownlint.json"
25+
- ".prettierrc"
26+
- ".prettierignore"
27+
- ".trunk/*.yaml"
28+
- ".trunk/*.json"
29+
- ".trunk/*rc"
30+
- ".vscode/**"
31+
- "babel.config.js"
32+
- "docusaurus.config.js"
33+
- "crowdin.yml"
34+
- "netlify.toml"
35+
- "tsconfig.json"
36+
i18n 🌐:
37+
- "i18n/**"
38+
- "docs/i18n/**"
39+
#annex 🌀:
40+
# - "*"
41+
#package 📦:
42+
# - 'ecosystem/packages/**/*.md'
43+
# - 'i18n/**/docusaurus-plugin-content-ecosystem/**/packages/**/*.md'
44+
plugin ⚙️:
45+
- "*"
46+
# - 'ecosystem/plugins/**.md'
47+
# - 'i18n/**/docusaurus-plugin-content-ecosystem/**/plugins/**/*.md'
48+
ci 🤖:
49+
- ".github/workflows/*"

.github/workflows/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 🔖 Pull Request Labeler
3+
on:
4+
pull_request_target:
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
jobs:
11+
triage:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/labeler@v4
15+
with:
16+
repo-token: "${{ secrets.GH_PAT }}"
17+
sync-labels: false

.github/workflows/lock.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @format
2+
---
3+
name: 🔒 Lock closed issues and PRs
4+
5+
on:
6+
schedule:
7+
- cron: "30 2 * * *"
8+
9+
jobs:
10+
lock:
11+
name: 🔐 Lock closed issues and PRs
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
concurrency:
17+
group: ci-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
steps:
19+
- uses: dessant/lock-threads@v4
20+
with:
21+
github-token: ${{ github.token }}
22+
issue-inactive-days: "30"
23+
issue-lock-reason: ""
24+
issue-comment: >
25+
Issue closed and locked due to lack of activity. If you encounter this same issue, please open a new issue and refer to this closed one.
26+
27+
pr-inactive-days: "7"
28+
pr-lock-reason: ""
29+
pr-comment: >
30+
Pull Request closed and locked due to lack of activity. If you'd like to build on this closed PR, you can clone it using this method: https://stackoverflow.com/a/14969986 Then open a new PR, referencing this closed PR in your message.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: "🔁 Rebase"
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
rebase:
9+
runs-on: ubuntu-latest
10+
name: 🔁 Rebase
11+
# Automate with comments: /autosquash, /rebase
12+
if: >-
13+
github.event.issue.pull_request != '' &&
14+
(
15+
contains(github.event.comment.body, '/rebase') ||
16+
contains(github.event.comment.body, '/autosquash')
17+
)
18+
steps:
19+
- name: ⤵️ Check out code from GitHub
20+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
21+
with:
22+
token: ${{ secrets.ORG_TOKEN }}
23+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
24+
- name: 🔁 Rebase
25+
uses: z-shell/.github/actions/[email protected]
26+
with:
27+
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.ORG_TOKEN }}

.github/workflows/stale-action.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: "👻 Stale"
3+
4+
on:
5+
schedule:
6+
- cron: "0 8 * * *"
7+
workflow_dispatch:
8+
9+
jobs:
10+
stale:
11+
name: "🧹 Clean up stale issues and PRs"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: "🚀 Run stale"
15+
uses: actions/stale@v7
16+
with:
17+
# 📋 https://github.com/actions/stale#all-options
18+
days-before-stale: 30
19+
days-before-close: 7
20+
exempt-all-pr-assignees: true
21+
exempt-all-pr-milestones: true
22+
remove-stale-when-updated: true
23+
stale-issue-label: "stale 👻"
24+
exempt-issue-labels: "no-stale 🔒,help-wanted 👥"
25+
stale-issue-message: >
26+
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be
27+
marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us
28+
know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and
29+
locked in 7 days if no further activity occurs. Thank you for your contributions!
30+
stale-pr-label: "stale 👻"
31+
exempt-pr-labels: "no-stale 🔒"
32+
stale-pr-message: >
33+
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has
34+
been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you
35+
for your contributions!

0 commit comments

Comments
 (0)