Skip to content

Commit

Permalink
Merge pull request #61 from wanjunlei/master
Browse files Browse the repository at this point in the history
fix some bug
  • Loading branch information
Benjamin Huo authored Mar 4, 2021
2 parents 763ed9a + deabca2 commit 67a4c9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/v2alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v2 contains API Schema definitions for the notification v1alpha1 API group
// Package v2alpha1 contains API Schema definitions for the notification v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=notification.kubesphere.io
package v2alpha1
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2"}
GroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
8 changes: 4 additions & 4 deletions pkg/notify/notifier/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func NewWebhookNotifier(logger log.Logger, receivers []config.Receiver, notifier
continue
}

if receiver.WebhookConfig == nil {
_ = level.Warn(logger).Log("msg", "WebhookNotifier: ignore receiver because of empty config")
continue
}
//if receiver.WebhookConfig == nil {
// _ = level.Warn(logger).Log("msg", "WebhookNotifier: ignore receiver because of empty config")
// continue
//}

n.webhooks = append(n.webhooks, receiver)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/notify/notifier/wechat/wechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type weChatMessage struct {
Text weChatMessageContent `yaml:"text,omitempty" json:"text,omitempty"`
ToUser string `yaml:"touser,omitempty" json:"touser,omitempty"`
ToParty string `yaml:"toparty,omitempty" json:"toparty,omitempty"`
Totag string `yaml:"totag,omitempty" json:"totag,omitempty"`
ToTag string `yaml:"totag,omitempty" json:"totag,omitempty"`
AgentID string `yaml:"agentid,omitempty" json:"agentid,omitempty"`
Safe string `yaml:"safe,omitempty" json:"safe,omitempty"`
Type string `yaml:"msgtype,omitempty" json:"msgtype,omitempty"`
Expand Down Expand Up @@ -171,7 +171,7 @@ func (n *Notifier) Notify(ctx context.Context, data template.Data) []error {
},
ToUser: w.ToUser,
ToParty: w.ToParty,
Totag: w.ToTag,
ToTag: w.ToTag,
AgentID: w.WechatConfig.AgentID,
Type: "text",
Safe: "0",
Expand Down

0 comments on commit 67a4c9b

Please sign in to comment.