Skip to content

Commit

Permalink
chore: init add of project
Browse files Browse the repository at this point in the history
Currently does nothing.
  • Loading branch information
retr0h committed Jun 17, 2024
1 parent 667f41e commit 192c871
Show file tree
Hide file tree
Showing 20 changed files with 500 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# codecov:
# require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "50...100"

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: false

ignore:
- "**/*_mock.go"
5 changes: 5 additions & 0 deletions .github/delete-merged-branch-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
exclude:
# dependabot auto deletes it's own branches
- dependabot/*
delete_closed_pr: true
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: chore

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: chore

- package-ecosystem: "gomod"
directory: "examples/go-client/"
schedule:
interval: "daily"
commit-message:
prefix: chore
ignore:
- dependency-name: ".*"
34 changes: 34 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
test/unit:
- changed-files:
- any-glob-to-any-file: "**/*_test.go"

test/integration:
- changed-files:
- any-glob-to-any-file: "tests/*"
- any-glob-to-any-file: "tests/*/**"

kind/go:
- changed-files:
- any-glob-to-any-file: "**/*.go"

kind/python:
- changed-files:
- any-glob-to-any-file: "python/*"

kind/yaml:
- changed-files:
- any-glob-to-any-file: "**/*.yaml"
- any-glob-to-any-file: "**/*.yml"

kind/docs:
- changed-files:
- any-glob-to-any-file: "docs/*"
- any-glob-to-any-file: "docs/*/**"

github/action:
- changed-files:
- any-glob-to-any-file: ".github/**/*.yml"

next:
- base-branch: 'main'
15 changes: 15 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Cleanup

on:
pull_request:
types: [closed]

jobs:
delete-branch:
runs-on: ubuntu-latest
steps:
- name: delete branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Conventional Commits
on:
pull_request:
branches: [ "main" ]
jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webiny/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/depreview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: task test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Greetings

on: [pull_request, issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
if: env.month != 'Oct'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for your first issue! 😊🕹️'
pr-message: 'Thank you for contributing to this project! 😊🕹️'
- uses: actions/first-interaction@v1
if: env.month == 'Oct'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for your first issue! Happy Hacktoberfest!!! 🎃👕🕹️'
pr-message: 'Thank you for contributing to this project. Happy Hacktoberfest!!! 🎃👕🕹️'
13 changes: 13 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
14 changes: 14 additions & 0 deletions .github/workflows/reportcard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Go Report Card

on:
push:
branches: [ "main" ]

jobs:
action_goreportcard:
runs-on: ubuntu-latest
name: A job to run go report card
steps:
- name: Go Report Card
uses: creekorful/[email protected]
18 changes: 18 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__pycache__
cobertura.xml
cover.out
dist/
result.xml
.task/
test/integration/tmp/
30 changes: 30 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Refer to golangci-lint's example config file for more options and information:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml

run:
timeout: 5m
modules-download-mode: readonly

linters:
enable:
- errcheck
- errname
- goimports
- govet
- prealloc
- predeclared
- revive
- staticcheck

linters-settings:
revive:
rules:
- name: package-comments
disabled: true

issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude-dirs:
- .asdf
73 changes: 73 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
ldflags:
- -s -w -X {{ .ModulePath }}/cmd.date={{ .CommitDate }}
- -X {{ .ModulePath }}/cmd.commit={{ .Commit }}
- -X {{ .ModulePath }}/cmd.version={{ .Version }}
- -X {{ .ModulePath }}/cmd.builtBy=goreleaser
- -X {{ .ModulePath }}/cmd.treestate={{ .IsGitDirty }}

archives:
- format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}.dev"
changelog:
sort: asc
filters:
exclude:
- '^test:'
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: "Features"
regexp: "^.*?feat:.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*?fix:.*$"
order: 1
- title: "Chores"
regexp: "^.*?chore:.*$"
order: 2
- title: "Docs"
regexp: "^.*?docs:.*$"
order: 3
- title: "CI"
regexp: "^.*?ci:.*$"
order: 4
- title: "Build"
regexp: "^.*?build:.*$"
order: 5
- title: Others
order: 999
brews:
- repository:
owner: retr0h
name: homebrew-tap
directory: Formula
goarm: "7"
homepage: https://github.com/retr0h/gilt
description: A GIT layering tool
license: MIT
test: |
system "#{bin}/goreleaser -v"
dependencies:
- name: go
type: optional
- name: git
universal_binaries:
- replace: true
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2024 John Dewey <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Git URL Parse

This project is a golang port of an old project of mine [git-url-parse][],
which was donated to [coala][].

It's usefulness may be limited, but I have a [fascination][] with revisiting
old projects.

[git-url-parse]: https://github.com/coala/git-url-parse
[coala]: https://coala.io/#/home?lang=Python
[fascination]: https://retr0h.github.io/gilt/

## License

The [MIT][] License.

[MIT]: LICENSE
Loading

0 comments on commit 192c871

Please sign in to comment.