Skip to content

Commit 7870a70

Browse files
authored
Merge pull request #1 from z-shell/main-1.0.1
Refactor
2 parents 82f1430 + 118c9ec commit 7870a70

28 files changed

+638
-103
lines changed

.editorconfig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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+
#
18+
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
19+
#
20+
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
21+
# vim: ft=zsh sw=2 ts=2 et
22+
23+
root = true
24+
25+
[*]
26+
charset = utf-8
27+
indent_style = space
28+
indent_size = 2
29+
insert_final_newline = true
30+
trim_trailing_whitespace = true
31+
32+
[*.sln]
33+
indent_style = tab
34+
35+
[*.{md,mdx,rst}]
36+
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: 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: "weekly"

.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/*"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# @format
2+
---
3+
name: "🔁 Rebase"
4+
5+
on:
6+
issue_comment:
7+
types: [created]
8+
9+
jobs:
10+
rebase:
11+
runs-on: ubuntu-latest
12+
name: 🔁 Rebase
13+
# Automate with comments: /autosquash, /rebase
14+
if: >-
15+
github.event.issue.pull_request != '' && (
16+
contains(github.event.comment.body, '/rebase') ||
17+
contains(github.event.comment.body, '/autosquash')
18+
)
19+
20+
steps:
21+
- name: ⤵️ Check out code from GitHub
22+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
26+
- name: 🔁 Rebase
27+
uses: z-shell/.github/actions/[email protected]
28+
with:
29+
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.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.

.github/workflows/stale.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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/[email protected]
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
days-before-stale: 30
19+
days-before-close: 7
20+
remove-stale-when-updated: true
21+
stale-issue-label: "stale 👻"
22+
exempt-issue-labels: "no-stale 🔒,help-wanted 👥"
23+
stale-issue-message: >
24+
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!
25+
26+
stale-pr-label: "stale 👻"
27+
exempt-pr-labels: "no-stale 🔒"
28+
stale-pr-message: >
29+
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

.github/workflows/sync-labels.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: "♻️ Sync Labels"
3+
4+
on:
5+
schedule:
6+
- cron: "22 2 * * 2"
7+
workflow_dispatch:
8+
9+
jobs:
10+
labels:
11+
name: "♻️ Sync labels"
12+
uses: z-shell/.github/.github/workflows/sync-labels.yml@main

0 commit comments

Comments
 (0)