mirror of
https://github.com/kha7iq/pingme.git
synced 2025-05-15 22:30:11 -07:00
chore: consistent naming in textmagic config
This commit is contained in:
parent
53b4fc8027
commit
091884f87d
@ -786,8 +786,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TEXTMAGIC_USER: ${{ secrets.TEXTMAGIC_USER }}
|
TEXTMAGIC_USER: ${{ secrets.TEXTMAGIC_USER }}
|
||||||
TEXTMAGIC_TOKEN: ${{ secrets.TEXTMAGIC_TOKEN }}
|
TEXTMAGIC_TOKEN: ${{ secrets.TEXTMAGIC_TOKEN }}
|
||||||
|
TEXTMAGIC_SUBJECT: 'Reference: ${{ github.ref }}'
|
||||||
TEXTMAGIC_MESSAGE: 'Event is triggered by ${{ github.event_name }}'
|
TEXTMAGIC_MESSAGE: 'Event is triggered by ${{ github.event_name }}'
|
||||||
TEXTMAGIC_TITLE: 'Reference: ${{ github.ref }}'
|
|
||||||
TEXTMAGIC_RECEIVER: ${{ secrets.TEXTMAGIC_RECEIVER }}
|
TEXTMAGIC_RECEIVER: ${{ secrets.TEXTMAGIC_RECEIVER }}
|
||||||
|
|
||||||
with:
|
with:
|
||||||
|
@ -12,11 +12,11 @@ import (
|
|||||||
|
|
||||||
//TextMagic struct describes required data needed to integrate with TextMagic
|
//TextMagic struct describes required data needed to integrate with TextMagic
|
||||||
type TextMagic struct {
|
type TextMagic struct {
|
||||||
Token string
|
Token string
|
||||||
User string
|
User string
|
||||||
Subject string
|
Subject string
|
||||||
Message string
|
Message string
|
||||||
Receivers string
|
Receiver string
|
||||||
}
|
}
|
||||||
|
|
||||||
//Send method sends a message via TextMagic service
|
//Send method sends a message via TextMagic service
|
||||||
@ -55,7 +55,7 @@ You can specify multiple receivers by separating the value with a comma.`,
|
|||||||
EnvVars: []string{"TEXTMAGIC_SUBJECT"},
|
EnvVars: []string{"TEXTMAGIC_SUBJECT"},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Destination: &textMagicOpts.Receivers,
|
Destination: &textMagicOpts.Receiver,
|
||||||
Name: "receiver",
|
Name: "receiver",
|
||||||
Usage: "Receiver(s) of the message",
|
Usage: "Receiver(s) of the message",
|
||||||
Aliases: []string{"r"},
|
Aliases: []string{"r"},
|
||||||
@ -73,7 +73,7 @@ You can specify multiple receivers by separating the value with a comma.`,
|
|||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
textMagicService := textmagic.New(textMagicOpts.User, textMagicOpts.Token)
|
textMagicService := textmagic.New(textMagicOpts.User, textMagicOpts.Token)
|
||||||
receivers, err := getReceivers(textMagicOpts.Receivers)
|
receivers, err := getReceivers(textMagicOpts.Receiver)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("invalid receivers provided, %w", err)
|
return fmt.Errorf("invalid receivers provided, %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user