Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marged refactoring #86

Open
wants to merge 74 commits into
base: git-sensor-sync
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
28e2c50
adding git commit message truncation logic for large messages
subhashish-devtron Jul 26, 2023
0d9c4de
first commit draft
subhashish-devtron Dec 6, 2023
477dafa
cleaning dead code
subhashish-devtron Dec 6, 2023
7d81796
added commit count
subhashish-devtron Dec 7, 2023
6a8cb30
fix git format in cmd
subhashish-devtron Dec 7, 2023
b09496e
added interfaces
subhashish-devtron Dec 7, 2023
86cc0e7
comments
subhashish-devtron Dec 7, 2023
6cce2ba
removing output
subhashish-devtron Dec 7, 2023
c56b115
minor restructuring
subhashish-devtron Dec 8, 2023
44f64c0
removing deuplicacy for OpenNewRepo
subhashish-devtron Dec 8, 2023
05bf692
changes
subhashish-devtron Dec 8, 2023
f32f62e
fixes
subhashish-devtron Dec 8, 2023
f1d713a
wire
subhashish-devtron Dec 8, 2023
d149d2d
old story refactor
subhashish-devtron Dec 8, 2023
22c8668
fixes for IT tests
subhashish-devtron Dec 8, 2023
49ea39e
cleaning
subhashish-devtron Dec 8, 2023
7a13d41
refactorings
subhashish-devtron Dec 8, 2023
46586fb
minor
subhashish-devtron Dec 11, 2023
38c4da2
test fixes
subhashish-devtron Dec 11, 2023
28269c3
test fixes
subhashish-devtron Dec 12, 2023
5b02ea3
test fixes
subhashish-devtron Dec 12, 2023
1c1cc25
PR comments
subhashish-devtron Dec 12, 2023
bb8bb2e
removing old changes
subhashish-devtron Dec 12, 2023
7feca8d
cleaning up
subhashish-devtron Dec 12, 2023
829bb02
wire
subhashish-devtron Dec 12, 2023
47146fb
minor changes
subhashish-devtron Dec 14, 2023
81fba24
added comments on interface methods
subhashish-devtron Dec 18, 2023
4b67f29
Merge remote-tracking branch 'origin/main' into gitcli
subhashish-devtron Dec 28, 2023
938c244
next error handling
subhashish-devtron Jan 2, 2024
ec9c5b4
added timeout and context in one flow
subhashish-devtron Jan 2, 2024
27022cd
added timeouts
subhashish-devtron Jan 2, 2024
aab3525
remaning flows
subhashish-devtron Jan 2, 2024
dd085c5
minor changes
subhashish-devtron Jan 3, 2024
da1f168
renaming to gitCtx
subhashish-devtron Jan 3, 2024
8bdcb10
added command timeout
subhashish-devtron Jan 3, 2024
80e5bff
added command timeout
subhashish-devtron Jan 3, 2024
31440d0
moving cancel defer in poller
subhashish-devtron Jan 3, 2024
e3b2aad
renaming
subhashish-devtron Jan 3, 2024
ab22c47
added command level timeouts
subhashish-devtron Jan 3, 2024
8d5a84d
fix
subhashish-devtron Jan 3, 2024
f6f21e4
minor
subhashish-devtron Jan 3, 2024
158c2e0
Merge remote-tracking branch 'origin/main' into gitclictx
subhashish-devtron Jan 8, 2024
81eafc8
removing process timeout
subhashish-devtron Jan 8, 2024
faa8a24
refactoring
subhashish-devtron Jan 8, 2024
a9b2d60
cli for analytics
subhashish-devtron Jan 9, 2024
5635331
changes
subhashish-devtron Jan 9, 2024
c78d648
changes
subhashish-devtron Jan 9, 2024
b3a08b3
minor
subhashish-devtron Jan 11, 2024
7eddb8f
adding gogit timeout
subhashish-devtron Jan 11, 2024
0a551ad
debugging
subhashish-devtron Jan 11, 2024
58ed542
testing fix
subhashish-devtron Jan 11, 2024
cbd5a5d
fixes
subhashish-devtron Jan 11, 2024
399dd51
fixes
subhashish-devtron Jan 11, 2024
951ffcd
minor refactor
subhashish-devtron Jan 16, 2024
94dde94
pr comments
subhashish-devtron Jan 16, 2024
51743fc
fixed it tests
subhashish-devtron Jan 16, 2024
e17bce3
common-lib upgrade
subhashish-devtron Jan 18, 2024
1c569c5
common lib from main
subhashish-devtron Jan 18, 2024
d4fdb37
fixes-be
subhashish-devtron Jan 24, 2024
23a84fb
adding support for last seen hash
subhashish-devtron Jan 24, 2024
e8a34c6
Merge remote-tracking branch 'origin/main' into optimizations-cli
subhashish-devtron Jan 24, 2024
e9f636f
git sensor updated
adi6859 Jan 30, 2024
820fff2
story(version-up) : Protos version updated
adi6859 Jan 30, 2024
1e66dc9
optimizations-cli in git-sensor-sync
ShashwatDadhich Feb 5, 2024
586efbd
Merge pull request #84 from devtron-labs/v3-git-sensor
adi6859 Feb 6, 2024
a5ff499
fix for history being overwritten
subhashish-devtron Feb 7, 2024
9ffc8e7
Merge remote-tracking branch 'origin/main' into optimizations-cli
subhashish-devtron Feb 7, 2024
87ebad5
Merge remote-tracking branch 'origin/main' into marged-refactoring
subhashish-devtron Feb 7, 2024
747abfd
Merge branch 'optimizations-cli' into marged-refactoring
subhashish-devtron Feb 7, 2024
e81ee9f
fixing for empty history
subhashish-devtron Feb 7, 2024
26fc0be
Merge branch 'optimizations-cli' into marged-refactoring
subhashish-devtron Feb 7, 2024
9bff44d
changes
subhashish-devtron Feb 7, 2024
f2886d7
fix: optimizations in git flows (#87)
subhashish-devtron Feb 7, 2024
c4ae47a
Merge remote-tracking branch 'origin/main' into marged-refactoring
ShashwatDadhich Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 22 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ go 1.20
require (
github.com/caarlos0/env v3.5.0+incompatible
github.com/devtron-labs/common-lib v0.0.10-0.20240118140811-762cb3b7f9a4
github.com/devtron-labs/protos v0.0.2
github.com/devtron-labs/protos v0.0.3-0.20240130061723-7b2e12ab0abb
github.com/gammazero/workerpool v0.0.0-20200206003619-019d125201ab
github.com/go-git/go-git/v5 v5.11.0
github.com/go-pg/pg v6.15.1+incompatible
github.com/google/wire v0.4.0
github.com/gorilla/handlers v1.4.2
Expand All @@ -22,48 +23,59 @@ require (
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.31.0
gopkg.in/src-d/go-billy.v4 v4.3.2
gopkg.in/src-d/go-git.v4 v4.13.1
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/arl/statsviz v0.6.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/gammazero/deque v0.0.0-20200124200322-7e84b94275b8 // indirect
github.com/gliderlabs/ssh v0.3.6 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hpcloud/tail v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/nats-io/jwt/v2 v2.3.0 // indirect
github.com/nats-io/nats.go v1.28.0 // indirect
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/onsi/ginkgo v1.10.3 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.38.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
mellium.im/sasl v0.3.1 // indirect
Expand Down
136 changes: 87 additions & 49 deletions go.sum

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions pkg/RepoManages.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,16 @@ func (impl RepoManagerImpl) updatePipelineMaterialCommit(gitCtx git.GitContext,
gitCtx = gitCtx.WithCredentials(material.GitProvider.UserName, material.GitProvider.Password).
WithCloningMode(impl.configuration.CloningMode)

commits, err := impl.repositoryManager.ChangesSince(gitCtx, material.CheckoutLocation, pipelineMaterial.Value, "", "", impl.configuration.GitHistoryCount)
fetchCount := impl.configuration.GitHistoryCount
commits, err := impl.repositoryManager.ChangesSince(gitCtx, material.CheckoutLocation, pipelineMaterial.Value, "", "", fetchCount)
//commits, err := impl.FetchChanges(pipelineMaterial.Id, "", "", 0)
if err == nil {
impl.logger.Infow("commits found", "commit", commits)
b, err := json.Marshal(commits)
totalCommits, err := git.AppendOldCommitsFromHistory(commits, pipelineMaterial.CommitHistory, fetchCount)
if err != nil {
impl.logger.Errorw("error in appending history to fetched commit", "err", err, "pipelineMaterialId", pipelineMaterial.Id)
}
b, err := json.Marshal(totalCommits)
if err == nil {
pipelineMaterial.CommitHistory = string(b)
if len(commits) > 0 {
Expand Down
22 changes: 20 additions & 2 deletions pkg/git/Bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
package git

import (
"encoding/json"
"fmt"
"github.com/devtron-labs/git-sensor/internals/sql"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
"io"
"time"
"unicode/utf8"
Expand Down Expand Up @@ -141,6 +143,22 @@ type GitCommitBase struct {
Excluded bool `json:",omitempty"`
}

func AppendOldCommitsFromHistory(newCommits []*GitCommitBase, commitHistory string, fetchedCount int) ([]*GitCommitBase, error) {

oldCommits := make([]*GitCommitBase, 0)
if len(commitHistory) > 0 {
err := json.Unmarshal([]byte(commitHistory), &oldCommits)
if err != nil {
return newCommits, fmt.Errorf("unmarshalling error %v", err)
}
}
totalCommits := append(newCommits, oldCommits...)
if len(totalCommits) > fetchedCount {
totalCommits = totalCommits[:fetchedCount]
}
return totalCommits, nil
}

func (gitCommit *GitCommitBase) SetFileStats(stats *FileStats) {
gitCommit.FileStats = stats
}
Expand Down
10 changes: 9 additions & 1 deletion pkg/git/GitCliManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"strconv"
"strings"
)

type GitCliManagerImpl struct {
Expand Down Expand Up @@ -165,11 +166,18 @@ func (impl *GitCliManagerImpl) processGitLogOutput(out string) ([]GitCommit, err

for _, formattedCommit := range gitCommitFormattedList {

subject := strings.TrimSpace(formattedCommit.Subject)
body := strings.TrimSpace(formattedCommit.Body)
message := subject
if len(body) > 0 {
message = strings.Join([]string{subject, body}, "\n")
}

cm := GitCommitBase{
Commit: formattedCommit.Commit,
Author: formattedCommit.Commiter.Name + " <" + formattedCommit.Commiter.Email + ">",
Date: formattedCommit.Commiter.Date,
Message: formattedCommit.Subject + "\n" + formattedCommit.Body,
Message: message,
}
gitCommits = append(gitCommits, &GitCommitCli{
GitCommitBase: cm,
Expand Down
18 changes: 10 additions & 8 deletions pkg/git/GitFormatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package git

import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
Expand All @@ -17,8 +16,8 @@ var GITFORMAT = "--pretty=format:{" +
_dl_ + "commit" + _dl_ + ":" + _dl_ + "%H" + _dl_ + "," +
_dl_ + "parent" + _dl_ + ":" + _dl_ + "%P" + _dl_ + "," +
_dl_ + "refs" + _dl_ + ":" + _dl_ + "%D" + _dl_ + "," +
_dl_ + "subject" + _dl_ + ":" + _dl_ + "%s" + _dl_ + "," +
_dl_ + "body" + _dl_ + ":" + _dl_ + "%b" + _dl_ + "," +
_dl_ + "subject" + _dl_ + ":" + _dl_ + "%<(1024,trunc)%s" + _dl_ + "," +
_dl_ + "body" + _dl_ + ":" + _dl_ + "%<(1024,trunc)%b" + _dl_ + "," +
_dl_ + "author" + _dl_ +
":{" +
_dl_ + "name" + _dl_ + ":" + _dl_ + "%aN" + _dl_ + "," +
Expand Down Expand Up @@ -52,13 +51,16 @@ func parseFormattedLogOutput(out string) ([]GitCommitFormat, error) {
out = strings.ReplaceAll(out, "},\n", "},")

// to escape the special characters like quotes and newline characters in the commit data
logOut := strconv.Quote(out)
var sb strings.Builder
buffer := strconv.AppendQuote(make([]byte, 0, len(out)), out)
sb.Write(buffer)
logOut := sb.String()

//replace the delimiter with quotes to make it parsable json
logOut = strings.ReplaceAll(logOut, _dl_, `"`)

logOut = logOut[1 : len(logOut)-2] // trim surround characters (surrounding quotes and trailing comma)
logOut = fmt.Sprintf("[%s]", logOut) // Add []
logOut = logOut[1 : len(logOut)-2] // trim surround characters (surrounding quotes and trailing comma)
logOut = strings.Join([]string{"[", "]"}, logOut)

var gitCommitFormattedList []GitCommitFormat
err := json.Unmarshal([]byte(logOut), &gitCommitFormattedList)
Expand All @@ -85,7 +87,7 @@ func (formattedCommit GitCommitFormat) transformToCommit() *Commit {
},
Tag: &Tag{},
Tree: &Tree{},
Subject: formattedCommit.Subject,
Body: formattedCommit.Body,
Subject: strings.TrimSpace(formattedCommit.Subject),
Body: strings.TrimSpace(formattedCommit.Body),
}
}
6 changes: 3 additions & 3 deletions pkg/git/GoGitSDKManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package git

import (
"fmt"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"go.uber.org/zap"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
"os"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/git/RepositoryManagerAnalytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"github.com/devtron-labs/git-sensor/internals"
"github.com/devtron-labs/git-sensor/util"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"go.uber.org/zap"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"io"
"log"
"strings"
Expand Down
16 changes: 14 additions & 2 deletions pkg/git/Watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,26 @@ func (impl GitWatcherImpl) pollGitMaterialAndNotify(material *sql.GitMaterial) e
impl.logger.Debugw("Running changesBySinceRepository for material - ", material)
impl.logger.Debugw("---------------------------------------------------------- ")
// parse env variables here, then search for the count field and pass here.
commits, err := impl.repositoryManager.ChangesSinceByRepository(gitCtx, repo, material.Value, "", "", impl.configuration.GitHistoryCount, checkoutLocation)
lastSeenHash := ""
if len(material.LastSeenHash) > 0 {
// this might misbehave is the hash stored in table is corrupted somehow
lastSeenHash = material.LastSeenHash
}
fetchCount := impl.configuration.GitHistoryCount
commits, err := impl.repositoryManager.ChangesSinceByRepository(gitCtx, repo, material.Value, lastSeenHash, "", fetchCount, checkoutLocation)
if err != nil {
material.Errored = true
material.ErrorMsg = err.Error()
erroredMaterialsModels = append(erroredMaterialsModels, material)
} else if len(commits) > 0 {
latestCommit := commits[0]
if latestCommit.GetCommit().Commit != material.LastSeenHash {

commitsTotal, err := AppendOldCommitsFromHistory(commits, material.CommitHistory, fetchCount)
if err != nil {
impl.logger.Errorw("error in appending history to new commits", "material", material.GitMaterialId, "err", err)
}

// new commit found
mb := &CiPipelineMaterialBean{
Id: material.Id,
Expand All @@ -263,7 +275,7 @@ func (impl GitWatcherImpl) pollGitMaterialAndNotify(material *sql.GitMaterial) e
material.CommitAuthor = latestCommit.Author
material.CommitDate = latestCommit.Date
material.CommitMessage = latestCommit.Message
commitJson, _ := json.Marshal(commits)
commitJson, _ := json.Marshal(commitsTotal)
material.CommitHistory = string(commitJson)
material.Errored = false
material.ErrorMsg = ""
Expand Down
12 changes: 12 additions & 0 deletions vendor/dario.cat/mergo/.deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version = 1

test_patterns = [
"*_test.go"
]

[[analyzers]]
name = "go"
enabled = true

[analyzers.meta]
import_path = "dario.cat/mergo"
33 changes: 33 additions & 0 deletions vendor/dario.cat/mergo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#### joe made this: http://goel.io/joe

#### go ####
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

#### vim ####
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]

# Session
Session.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
12 changes: 12 additions & 0 deletions vendor/dario.cat/mergo/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: go
arch:
- amd64
- ppc64le
install:
- go get -t
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
script:
- go test -race -v ./...
after_script:
- $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN
46 changes: 46 additions & 0 deletions vendor/dario.cat/mergo/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making 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]. The project team will review and investigate all complaints, and will respond in a way that it deems 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 [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Loading