Skip to content

Commit

Permalink
Merge pull request #1 from go-vela/email-code
Browse files Browse the repository at this point in the history
feat: initialize and open source email plugin code
  • Loading branch information
kaymckay authored Feb 3, 2022
2 parents 9c2223f + 03da61e commit 3f36729
Show file tree
Hide file tree
Showing 33 changed files with 2,850 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>

## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})

{{ range .CommitGroups -}}

### {{ .Title }}

{{ range .Commits -}}

- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}

### Reverts

{{ range .RevertCommits -}}

- {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}

### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @go-vela/admins
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at
[[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
142 changes: 142 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Contributing

We'd love to accept your contributions to this project! There are just a few guidelines you need to follow.

## Bugs

Bug reports should be opened up as [issues](https://help.github.com/en/github/managing-your-work-on-github/about-issues) on the [go-vela/community](https://github.com/go-vela/community) repository!

## Feature Requests

Feature Requests should be opened up as [issues](https://help.github.com/en/github/managing-your-work-on-github/about-issues) on the [go-vela/community](https://github.com/go-vela/community) repository!

## Pull Requests

**NOTE: We recommend you start by opening a new issue describing the bug or feature you're intending to fix. Even if you think it's relatively minor, it's helpful to know what people are working on.**

We are always open to new PRs! You can follow the below guide for learning how you can contribute to the project!

## Getting Started

### Prerequisites

- [Review the commit guide we follow](https://chris.beams.io/posts/git-commit/#seven-rules) - ensure your commits follow our standards
- [Docker](https://docs.docker.com/install/) - building block for local development
- [Docker Compose](https://docs.docker.com/compose/install/) - start up local development
- [Golang](https://golang.org/dl/) - for source code and [dependency management](https://github.com/golang/go/wiki/Modules)
- [Make](https://www.gnu.org/software/make/) - start up local development

### Setup

- [Fork](/fork) this repository

- Clone this repository to your workstation:

```bash
# Clone the project
git clone [email protected]:go-vela/vela-email.git $HOME/go-vela/vela-email
```

- Navigate to the repository code:

```bash
# Change into the project directory
cd $HOME/go-vela/vela-email
```

- Point the original code at your fork:

```bash
# Add a remote branch pointing to your fork
git remote add fork https://github.com/your_fork/vela-email
```

### Development

**Please review the [local development documentation](../DOCS.md) for more information.**

- Navigate to the repository code:

```bash
# change into the cloned project directory
cd $HOME/go-vela/vela-email
```

- Write your code and tests to implement the changes you desire.

- Please be sure to [follow our commit rules](https://chris.beams.io/posts/git-commit/#seven-rules)
- Please address linter warnings appropriately. If you are intentionally violating a rule that triggers a linter, please annotate the respective code with `nolint` declarations [[docs](https://golangci-lint.run/usage/false-positives/)]. we are using the following format for `nolint` declarations:

```go
// nolint:<linter(s)> // <short reason>
```

Example:

```go
// nolint:gocyclo // legacy function is complex, needs simplification
func superComplexFunction() error {
// ..
}
```

Check the [documentation for more examples](https://golangci-lint.run/usage/false-positives/).

- Build the repository code:

```bash
# execute the `build` target with `make`
make build
```

- Run the repository code (ensures your changes perform as you desire):

```bash
# execute the `run` target with `make`
make run
```

- Test the repository code (ensures your changes don't break existing functionality):
```bash
# execute the `test` target with `make`
make test
```
- Clean the repository code (ensures your code meets the project standards):
```bash
# execute the `clean` target with `make`
make clean
```
- Push to your fork:
```bash
# push your code up to your fork
git push fork main
```
- Open a pull request!
- For the title of the pull request, please use the following format for the title:
```text
feat(wobble): add hat wobble
^--^^------^ ^------------^
| | |
| | +---> Summary in present tense.
| +---> Scope: a noun describing a section of the codebase (optional)
+---> Type: chore, docs, feat, fix, refactor, or test.
```
- feat: adds a new feature (equivalent to a MINOR in Semantic Versioning)
- fix: fixes a bug (equivalent to a PATCH in Semantic Versioning)
- docs: changes to the documentation
- refactor: refactors production code, eg. renaming a variable; doesn't change public API
- test: adds missing tests, refactors tests; no production code change
- chore: updates something without impacting the user (ex: bump a dependency in package.json or go.mod); no production code change

If a code change introduces a breaking change, place ! suffix after type, ie. feat(change)!: adds breaking change. correlates with MAJOR in semantic versioning.

Thank you for your contribution!
29 changes: 29 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# vela-email

[![license](https://img.shields.io/crates/l/gl.svg)](../LICENSE)

Vela plugin designed for sending data to email.

## Documentation

For installation and usage, please [visit our docs](https://go-vela.github.io/docs).

## Contributing

We are always welcome to new pull requests!

Please see our [contributing](CONTRIBUTING.md) docs for further instructions.

## Support

We are always here to help!

Please see our [support](SUPPORT.md) documentation for further instructions.

## Copyright and License

```
Copyright (c) 2022 Target Brands, Inc.
```

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
15 changes: 15 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Support

Welcome to Vela! To get help with a specific aspect of Vela, we've provided the below information.

## Bugs or Feature Requests

We use GitHub for tracking bugs and feature requests.

Please see our [contributing](CONTRIBUTING.md) documentation for further instructions.

## Questions

We use Slack for supporting questions not already covered in the above documents.

Please join the [#vela](https://gophers.slack.com/app_redirect?channel=CNRRKE8KY) channel.
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>go-vela/renovate-config"]
}
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# name of the action
name: build

# trigger on pull_request or push events
on:
pull_request:
push:

# pipeline to execute
jobs:
build:
runs-on: ubuntu-latest
container:
image: golang:1.17
steps:
- name: clone
uses: actions/checkout@v2

- name: build
run: |
make build
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '32 7 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
Loading

0 comments on commit 3f36729

Please sign in to comment.