mirror of
https://github.com/valitydev/botkube.git
synced 2024-11-06 00:15:22 +00:00
Codespell action for BotKube (#394)
This commit adds GitHub action which checks for common misspellings across repository.
This commit is contained in:
parent
b78d072f98
commit
5974581b13
2
.codespell-whitelist
Normal file
2
.codespell-whitelist
Normal file
@ -0,0 +1,2 @@
|
||||
iam
|
||||
ue
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -19,6 +19,8 @@ jobs:
|
||||
- name: Install golint
|
||||
run: |
|
||||
go get -u golang.org/x/lint/golint
|
||||
- name: Codespell action
|
||||
uses: sanketsudake/codespell-action@v1
|
||||
- name: Before build
|
||||
run: |
|
||||
echo Workflow trigger - ${{ github.event_name }}
|
||||
|
@ -14,9 +14,9 @@
|
||||
- Aggregate pod status to reduce notification noise [\#212](https://github.com/infracloudio/botkube/issues/212)
|
||||
- Add support to monitor custom resources [\#200](https://github.com/infracloudio/botkube/issues/200)
|
||||
- Limit kubectl commands [\#183](https://github.com/infracloudio/botkube/issues/183)
|
||||
- Swich to github actions for CI builds [\#179](https://github.com/infracloudio/botkube/issues/179)
|
||||
- Switch to github actions for CI builds [\#179](https://github.com/infracloudio/botkube/issues/179)
|
||||
- Setting default namespace while executing kubectl commands [\#176](https://github.com/infracloudio/botkube/issues/176)
|
||||
- Add Microsoft Teams suppport [\#60](https://github.com/infracloudio/botkube/issues/60)
|
||||
- Add Microsoft Teams support [\#60](https://github.com/infracloudio/botkube/issues/60)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
- options to pass exta annotations for pod [\#304](https://github.com/infracloudio/botkube/pull/304) ([kartik-moolya](https://github.com/kartik-moolya))
|
||||
- Add aws config in helm values [\#303](https://github.com/infracloudio/botkube/pull/303) ([kartik-moolya](https://github.com/kartik-moolya))
|
||||
- adding feature to support AWS Signing and creating new index per day [\#302](https://github.com/infracloudio/botkube/pull/302) ([kartik-moolya](https://github.com/kartik-moolya))
|
||||
- Allow kubectl commands wihtout namespace and without cluster-name [\#301](https://github.com/infracloudio/botkube/pull/301) ([gmkumar2005](https://github.com/gmkumar2005))
|
||||
- Allow kubectl commands without namespace and without cluster-name [\#301](https://github.com/infracloudio/botkube/pull/301) ([gmkumar2005](https://github.com/gmkumar2005))
|
||||
- Mergify: configuration update [\#287](https://github.com/infracloudio/botkube/pull/287) ([PrasadG193](https://github.com/PrasadG193))
|
||||
- Refactor logging package \(\#262\) [\#285](https://github.com/infracloudio/botkube/pull/285) ([hmharsh](https://github.com/hmharsh))
|
||||
- Make allowed kubectl commands configurable [\#284](https://github.com/infracloudio/botkube/pull/284) ([girishg4t](https://github.com/girishg4t))
|
||||
|
@ -46,11 +46,11 @@ RUN apk add --no-cache ca-certificates git \
|
||||
# Production image
|
||||
FROM alpine:3.10
|
||||
|
||||
# Create Non Privilaged user
|
||||
# Create Non Privileged user
|
||||
RUN addgroup --gid 101 botkube && \
|
||||
adduser -S --uid 101 --ingroup botkube botkube
|
||||
|
||||
# Run as Non Privilaged user
|
||||
# Run as Non Privileged user
|
||||
USER botkube
|
||||
|
||||
COPY --from=BUILD-ENV /go/bin/botkube /go/bin/botkube
|
||||
|
@ -385,7 +385,7 @@ spec:
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: botkube-certificate-secret
|
||||
# run as non privilaged user
|
||||
# run as non privileged user
|
||||
securityContext:
|
||||
runAsUser: 101
|
||||
runAsGroup: 101
|
||||
|
@ -128,7 +128,7 @@ func (b *MMBot) Start() {
|
||||
return
|
||||
}
|
||||
|
||||
// Check incomming message and take action
|
||||
// Check incoming message and take action
|
||||
func (mm *mattermostMessage) handleMessage(b MMBot) {
|
||||
post := model.PostFromJson(strings.NewReader(mm.Event.Data["post"].(string)))
|
||||
channelType := mmChannelType(mm.Event.Data["channel_type"].(string))
|
||||
@ -163,7 +163,7 @@ func (mm mattermostMessage) sendMessage() {
|
||||
if len(mm.Response) >= 3990 {
|
||||
res, resp := mm.APIClient.UploadFileAsRequestBody([]byte(mm.Response), mm.Event.Broadcast.ChannelId, mm.Request)
|
||||
if resp.Error != nil {
|
||||
log.Error("Error occured while uploading file. Error: ", resp.Error)
|
||||
log.Error("Error occurred while uploading file. Error: ", resp.Error)
|
||||
}
|
||||
post.FileIds = []string{string(res.FileInfos[0].Id)}
|
||||
} else if len(mm.Response) == 0 {
|
||||
|
@ -304,7 +304,7 @@ func runKubectlCommand(args []string, clusterName, defaultNamespace string, isAu
|
||||
return fmt.Sprintf("Cluster: %s\n%s", clusterName, out)
|
||||
}
|
||||
|
||||
// TODO: Have a seperate cli which runs bot commands
|
||||
// TODO: Have a separate cli which runs bot commands
|
||||
func (e *DefaultExecutor) runNotifierCommand(args []string, clusterName string, isAuthChannel bool) string {
|
||||
if isAuthChannel == false {
|
||||
return ""
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
|
||||
func TestIsObjectNotifDisabled(t *testing.T) {
|
||||
tests := map[string]struct {
|
||||
annotaion metaV1.ObjectMeta
|
||||
expected bool
|
||||
annotation metaV1.ObjectMeta
|
||||
expected bool
|
||||
}{
|
||||
`Empty ObjectMeta`: {metaV1.ObjectMeta{}, false},
|
||||
`ObjectMeta with some annotations`: {metaV1.ObjectMeta{Annotations: map[string]string{"foo": "bar"}}, false},
|
||||
@ -38,7 +38,7 @@ func TestIsObjectNotifDisabled(t *testing.T) {
|
||||
for name, test := range tests {
|
||||
name, test := name, test
|
||||
t.Run(name, func(t *testing.T) {
|
||||
if actual := isObjectNotifDisabled(test.annotaion); actual != test.expected {
|
||||
if actual := isObjectNotifDisabled(test.annotation); actual != test.expected {
|
||||
t.Errorf("expected: %+v != actual: %+v\n", test.expected, actual)
|
||||
}
|
||||
})
|
||||
|
@ -35,7 +35,7 @@ type Object struct {
|
||||
Other Other `json:"other"`
|
||||
}
|
||||
|
||||
// Other mocks fileds like MetaData, Status etc in kubernetes objects
|
||||
// Other mocks fields like MetaData, Status etc in kubernetes objects
|
||||
type Other struct {
|
||||
Foo string `json:"foo"`
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ func TransformIntoTypedObject(obj *unstructured.Unstructured, typedObject interf
|
||||
return runtime.DefaultUnstructuredConverter.FromUnstructured(obj.UnstructuredContent(), typedObject)
|
||||
}
|
||||
|
||||
//GetStringInYamlFormat get the formated commands list
|
||||
//GetStringInYamlFormat get the formatted commands list
|
||||
func GetStringInYamlFormat(header string, commands map[string]bool) string {
|
||||
var b bytes.Buffer
|
||||
fmt.Fprintln(&b, header)
|
||||
|
@ -43,7 +43,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// update message in mutex
|
||||
s.receivedPayloads.Lock()
|
||||
log.Debugf("Incomming Webhook Messages :%#v", t)
|
||||
log.Debugf("Incoming Webhook Messages :%#v", t)
|
||||
s.receivedPayloads.messages = append(s.receivedPayloads.messages, t)
|
||||
s.receivedPayloads.Unlock()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user