Skip to content

Commit c405c28

Browse files
committed
initial commit
0 parents  commit c405c28

28 files changed

+824
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mach-composer/cli

.github/CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platform
2+
github: [labd]

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Bug report
3+
about: When you are running into an issue
4+
title: ''
5+
labels: bug, triage
6+
assignees: ''
7+
8+
---

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Feature request
3+
about: When you are missing a specific feature
4+
title: ''
5+
labels: enhancement, triage
6+
assignees: ''
7+
8+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Support request
3+
about: When you have a generic question
4+
title: ''
5+
labels: question, triage
6+
assignees: ''
7+
8+
---

.github/pull-request-template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--
2+
3+
Describe in detail the changes you are proposing, and the rationale.
4+
5+
-->
6+
7+
<!--
8+
9+
Link all GitHub issues fixed by this PR, and add references to prior related PRs.
10+
11+
-->
12+
13+
Fixes #
14+
15+
### NEW FEATURES | UPGRADE NOTES | ENHANCEMENTS | BUG FIXES | EXPERIMENTS
16+
17+
<!--
18+
19+
Write a short description of your changes. Examples:
20+
21+
- Fixed a bug
22+
- Added a new feature
23+
- Updated documentation
24+
25+
-->
26+
27+
-

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
branches:
6+
- 'pipelines/**'
7+
tags:
8+
- 'v*'
9+
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.19
22+
23+
- name: Create release
24+
uses: goreleaser/goreleaser-action@v3
25+
with:
26+
args: release --rm-dist
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
GOPATH: ${{ env.GOPATH }}
30+
31+
- name: Upload release
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: mach-composer
35+
path: dist/*

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Run Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
linux:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
max-parallel: 4
12+
matrix:
13+
go-version: [1.19.x]
14+
15+
steps:
16+
- name: Set up Go
17+
uses: actions/setup-go@v3
18+
with:
19+
go-version: ${{ matrix.go-version }}
20+
id: go
21+
22+
- name: Set up Go modules cache
23+
uses: actions/cache@v3
24+
env:
25+
cache-name: cache-go-modules
26+
with:
27+
path: ~/go/pkg/mod
28+
key: ${{ runner.os }}-go${{ matrix.go-version }}-build-${{ hashFiles('**/go.sum') }}
29+
restore-keys: |
30+
${{ runner.os }}-go${{ matrix.go-version }}-build-${{ env.cache-name }}-
31+
${{ runner.os }}-go${{ matrix.go-version }}-build-
32+
${{ runner.os }}-go${{ matrix.go-version }}-
33+
34+
- name: Check out code
35+
uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0
38+
39+
- name: golangci-lint
40+
uses: golangci/golangci-lint-action@v3
41+
with:
42+
args: --issues-exit-code=0
43+
44+
- name: Run tests
45+
run: |
46+
make build
47+
make cover

.github/workflows/triage.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Triage
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
add_to_project:
10+
name: Push issue or PR to board
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: get app token
14+
id: get-app-token
15+
uses: labd/action-gh-app-token@main
16+
with:
17+
app-id: ${{ secrets.MCI_APP_ID }}
18+
private-key: ${{ secrets.MCI_APP_PRIVATE_KEY }}
19+
installation-id: ${{ secrets.MCI_APP_INSTALLATION_ID }}
20+
- name: set to project board
21+
uses: actions/add-to-project@v0.5.0
22+
with:
23+
project-url: https://github.com/orgs/mach-composer/projects/3
24+
github-token: ${{ steps.get-app-token.outputs.app-token }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
mach-composer-plugin-*

.golangci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
linters:
2+
disable-all: true
3+
enable:
4+
- asciicheck
5+
- bodyclose
6+
- contextcheck
7+
- errcheck
8+
- exhaustive
9+
- exportloopref
10+
- forcetypeassert
11+
- goimports
12+
- gosimple
13+
- govet
14+
- ineffassign
15+
- predeclared
16+
- staticcheck
17+
- tenv
18+
- typecheck
19+
- unused
20+
- whitespace

.goreleaser.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
project_name: mach-composer-plugin-storyblok
2+
3+
builds:
4+
- id: "mach-composer-plugin"
5+
main: ./main.go
6+
binary: "{{ .ProjectName }}_v{{ .Version }}"
7+
flags:
8+
- -trimpath
9+
env:
10+
- CGO_ENABLED=0
11+
ldflags:
12+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
13+
goos:
14+
- windows
15+
- linux
16+
- darwin
17+
goarch:
18+
- amd64
19+
- arm
20+
- arm64
21+
mod_timestamp: '{{ .CommitTimestamp }}'
22+
23+
checksum:
24+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
25+
algorithm: sha256
26+
27+
changelog:
28+
sort: asc
29+
filters:
30+
exclude:
31+
- "^docs:"
32+
- "^test:"
33+
34+
archives:
35+
- id: "mach-composer-plugin"
36+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
37+
format: zip
38+
files:
39+
- LICENSE

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 0.1.0 (unreleased)
2+
Initial creation of the changelog

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 MACH composer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)