Skip to content

Commit

Permalink
chore: change gitflow to github-flow (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed Oct 1, 2023
1 parent 4e3e95c commit e2d07fb
Show file tree
Hide file tree
Showing 87 changed files with 4,945 additions and 671 deletions.
7 changes: 7 additions & 0 deletions .ci/linters/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
warn_list:
- '204' # Lines should be less than 160 characters
- '701' # meta/main.yml should contain relevant info
skip_list:
- '106' # Role name must match ^[a-z][a-z0-9_]+$ pattern
- 'yaml'
- 'role-name'
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions .ci/linters/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
parser: "@typescript-eslint/parser",
env: {
node: true,
es2021: true
},
parserOptions: {
ecmaVersion: 6,
sourceType: "module" // Allows for the use of imports
},
extends: [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:import/warnings"
],
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/semicolon": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "off",
"no-throw-literal": "warn",
curly: "warn",
eqeqeq: "warn",
semi: "off"
},
ignorePatterns: ["**/*.d.ts"]
}
28 changes: 9 additions & 19 deletions .github/linters/.gitleaks.toml → .ci/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,27 +160,10 @@ title = "gitleaks config"
description = "ignore value fake"
regexes = [
'''host=HOST''',
'''--private-key={{.PRIVATE_KEY_FILE}}''',
'''PASSWORD=XXXXXX''',
]

[[rules]]
description = "Email"
regex = '''[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}'''
tags = ["email"]
[rules.allowlist]
description = "ignore emails"
regexes = [
'''[a-zA-Z0-9._%+-][email protected]''',
'''[a-zA-Z0-9._%+-][email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
'''[email protected]''',
]

[[rules]]
description = "High Entropy"
Expand Down Expand Up @@ -231,6 +214,13 @@ title = "gitleaks config"
# Global allowlist
[allowlist]
description = "Whitelisted files"
paths = [
'''^vendor/''',
'''^bower_components/''',
'''^public/''',
'''^node_modules/''',
'''^theme/''',
]
files = [
'''(.*?)(jpg|gif|png|doc|pdf|bin|mp3|mp4|mov|ttf|woff|woff2|eot|lock)$''',
'''^\.gitignore$''',
Expand Down
12 changes: 12 additions & 0 deletions .github/linters/.golangci.yml → .ci/linters/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ linters:
- unconvert
- misspell
- nakedret
- unused

presets:
- bugs
Expand All @@ -113,6 +114,17 @@ linters:
- goerr113
- scopelint
- golint
- bodyclose
- contextcheck
- nilerr
- noctx
- rowserrcheck
- sqlclosecheck
- structcheck
- unparam
- deadcode
- varcheck
- asasalint

# Drives todos nuts
- godox
Expand Down
73 changes: 73 additions & 0 deletions .ci/linters/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: zsh-resources
env:
- GO111MODULE=on
- REPO=github.com/hadenlabs/zsh-resources
before:
hooks:
- go mod download
- go mod tidy
- go mod vendor
- go generate ./...

# https://goreleaser.com/build/
builds:
# Defaults to the project name.
- id: default
# ID of the build.
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X "{{.Env.REPO}}/cmd.Version={{.Version}}"
- -X "{{.Env.REPO}}/cmd.Commit={{.FullCommit}}"
- -X "{{.Env.REPO}}/cmd.RepoURL={{.GitURL}}"
- -X "{{.Env.REPO}}/cmd.BuildDate={{.Date}}"
- -X "{{.Env.REPO}}/cmd.BuiltWithGoVersion={{.Env.GO_VERSION}}"
- -X "{{.Env.REPO}}/cmd.BuiltBy={{.Env.BUILT_BY}}"
goos:
- darwin
- linux
goarch:
- amd64
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
builds:
- default
wrap_in_directory: true
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}"
format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- CHANGELOG.md
- config/**/*
- systemd/*
# https://goreleaser.com/snapshots/
snapshot:
name_template: "dev@{{.ShortCommit}}"

# https://goreleaser.com/checksum/
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
github:
owner: hadenlabs
name: zsh-resources
draft: true
prerelease: auto
name_template: "{{.ProjectName}}-v{{.Version}}-{{.ShortCommit}}-{{.Date}}"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const escape = require('shell-quote').quote
const escape = require("shell-quote").quote

module.exports = {
'*.{ts,tsx,js,json,css}': (filenames) => [
"*.{ts,tsx,js,json,css}": (filenames) => [
...filenames.map((filename) => `prettier --check "${escape([filename])}"`),
...filenames.map((filename) => `git add "${filename}"`)
],
'*.{ts,tsx,js,jsx}': ['eslint'],
'*.{ts,tsx,css}': ['stylelint']
"*.{ts,tsx,js,jsx}": ["eslint"],
"*.{ts,tsx,css}": ["stylelint"]
}
10 changes: 9 additions & 1 deletion .github/linters/.prettierignore → .ci/linters/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ coverage
.mypy_cache/
.build
.terraform
.github/linters/.cache/*
.ci/linters/.cache/*
.cache/*
terraform.md
*.tpl.md
*.enc.yaml
vendor
public
staticfiles
out
.vscode-test
.cache
.venv
contrib/
site/
.external_modules
CHANGELOG.md
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions .github/linters/.tflint.hcl → .ci/linters/.tflint.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
plugin "aws" {
enabled = true
version = "0.23.1"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
rule "terraform_deprecated_index" {
enabled = true
}
Expand Down
7 changes: 7 additions & 0 deletions .ci/linters/.yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default

rules:
line-length:
max: 200
level: warning
11 changes: 11 additions & 0 deletions .ci/linters/checkov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
download-external-modules: true
evaluate-variables: true
external-modules-download-path: .external_modules
framework:
- all
no-guide: true
output: cli
quiet: true
skip-fixes: true
skip-suppressions: true
soft-fail: true
File renamed without changes.
63 changes: 63 additions & 0 deletions .ci/linters/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module.exports = {
arrowParens: "always",
printWidth: 120,
proseWrap: "preserve",
semi: false,
singleQuote: false,
tabWidth: 2,
trailingComma: "none",
overrides: [
{
files: "{*.js?(x),*.ts?(x),*.y?(a)ml,.*.y?(a)ml,*.md,.prettierrc,.stylelintrc,.babelrc}",
options: {
arrowParens: "always",
printWidth: 100,
semi: false,
quoteProps: "as-needed",
tabWidth: 2,
trailingComma: "none"
}
},
{
files: "{*.json,.*.json,**/.vscode/*.json,**/tsconfig.json,**/tsconfig.*.json}",
options: {
parser: "json",
tabWidth: 2,
quoteProps: "preserve"
}
},
{
files: "*.md",
options: {
parser: "markdown",
printWidth: 120,
proseWrap: "never",
semi: false,
trailingComma: "none"
}
},
{
files: "*.mdx",
options: {
printWidth: 120,
proseWrap: "never",
semi: false,
trailingComma: "none"
}
},
{
files: "*.{sass,scss}",
options: {
parser: "scss"
}
},
{
files: "*.less",
options: {
tabWidth: 4,
printWidth: 80,
parser: "less"
}
}
]
}
31 changes: 31 additions & 0 deletions .ci/linters/yamllint.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ignore: |
.gitlab/
extends: default

rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
max: 180
level: warning
allow-non-breakable-inline-mappings: true
truthy: disable
1 change: 1 addition & 0 deletions .codespell-ignores
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cas
keypair
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.*
!.coveragerc
!.env
!.pylintrc
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ indent_style = space
# Set default charset
charset = utf-8
trim_trailing_whitespace = true
indent_size = 2

# Custom Coding Styles for Java files
[*.java]

# The other allowed value you can use is space
indent_style = tab

# You can play with this value and set it to how
# many characters you want your indentation to be
indent_size = 2

# Character set to be used in java files.
charset = utf-8
trim_trailing_whitespace = true

[*.{el}]
insert_final_newline = false
Expand Down
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
APP_NAME=zsh-resources
# **NOTE**: please check the following document docs/env-vars.md
APP_NAME=zsh-resources
SONAR_URL=
SONAR_TOKEN=
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ bin/* text eol=lf
*.so binary
*.war binary
*.xls binary
*.xlsx binary
*.xlsx binary
*.pem binary
*.pub binary
*.crt binary
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ otechie: # Replace with a single Otechie username
custom:
- https://www.paypal.me/luismayta
- https://www.buymeacoffee.com/luismayta
- https://amzn.com/w/1VJ9F3BEK0S8B
Loading

0 comments on commit e2d07fb

Please sign in to comment.