-
Notifications
You must be signed in to change notification settings - Fork 0
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
RESP-4311 Mostly update forked slack go library #34
Changes from 181 commits
b54bd85
32bb00d
c6ed812
0254b8f
25f2f6e
bb28237
377ffe4
7589264
c4f3ebe
824342e
ff7c502
2c07018
d66f160
3d08e57
dc96c95
39c076e
c13750f
63294cb
b870f29
f63770d
5380d7d
a22a95b
22489e7
5923d7d
2c348c8
e2fef23
c041414
21cbc5f
c8507df
92a834b
7f26ad5
b146c45
002a1c6
b4b5a64
d5e621e
39c7b2a
54fa87e
7f50a78
5281ebe
58c5a5f
2b2e893
646e50d
f2673af
c4095cb
8c8b886
5babfb7
4dd1a1f
2680267
7302609
e54a868
05af10c
fcee000
db60a05
f7c27ea
00233ed
3b8d5b7
7fceb91
4b09d41
1abbd7a
6c46b7c
dd3d9cc
6bfd393
c33746b
f7d479f
14d4607
a33e5ae
b9a30c0
2f5b296
8f8f4e9
dc27c00
311ff6a
7b783e6
6fe1bec
80f6b07
49c50d0
35d0f96
217f2de
cf4e8bc
3dc3db8
c806c9c
65cefed
4c00dbd
b13e91d
b801caa
e439902
e715221
1b0eb7d
f2fe7b3
311e30d
8019a9a
fd060b6
0f23d87
2a4205d
59faa0e
4160354
07c76ba
86cd1bd
0ecd566
e821170
cd8ca23
bc6223b
53178c2
f6b09b8
e743e65
9d132f3
15f367e
687e2d3
4c9f181
c4923b2
ceb2250
9cc451b
fd5d171
398133c
e1cc0bf
a31aeaa
c038c02
b6db972
5dbee1c
2a9c35c
9a23f7a
af783b3
fddc1a6
d2493fa
ce744b2
3815306
e337d74
f0c1d7a
b384934
3a0fd11
8b4dc51
eb325a5
55bdd38
0c1ba09
a47d659
7138048
2824b31
204bf37
ceced00
c530ebb
41fa1e5
d959a37
f7a929c
006a688
f7cac82
bc70fad
ef53c0c
5094cdf
cab4284
0a5c9e1
ecfe504
7ddfd02
1dfd1df
b9d4317
25fefc8
75103a9
99b3ebe
e947079
50e7414
5345c06
242df46
11b3b95
38949f9
5386d65
6c4585b
cd4e26e
6998189
447b7cd
57aa84d
132e0d1
21e61c5
c5ef90e
203cdb2
61f5761
573832b
01f17e8
1e4725e
0c1f7fe
3601e01
e7279fc
85a6fc8
2219a43
d736151
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '0 0 * * 1' # every Monday 0:00 UTC | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 | ||
with: | ||
any-of-labels: 'feedback given' | ||
days-before-stale: 45 | ||
days-before-pr-close: 10 | ||
stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' | ||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' | ||
close-issue-message: 'This issue was closed because it has been stalled for 10 days with no activity.' | ||
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' | ||
operations-per-run: 120 |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this had conflicts but the tests & linter run and pass so not much danger here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.test | ||
*~ | ||
.idea/ | ||
/vendor/ |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this had some minor conflicts because we had implemented our own call block, but I've replaced it entirely with theirs |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this had some minor conflicts because we had implemented our own call block, but I've replaced it entirely with theirs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,24 @@ | ||
package slack | ||
|
||
// CallBlock defines information | ||
// CallBlock defines data that is used to display a call in slack. | ||
// | ||
// More Information: https://api.slack.com/apis/calls#post_to_channel | ||
type CallBlock struct { | ||
Type MessageBlockType `json:"type"` | ||
CallID string `json:"call_id"` | ||
BlockID string `json:"block_id"` | ||
APIDecorationAvailable bool `json:"api_decoration_available"` | ||
Call Call `json:"call"` | ||
} | ||
|
||
type AppIconUrls struct { | ||
Image32 string `json:"image_32"` | ||
Image36 string `json:"image_36"` | ||
Image48 string `json:"image_48"` | ||
Image64 string `json:"image_64"` | ||
Image72 string `json:"image_72"` | ||
Image96 string `json:"image_96"` | ||
Image128 string `json:"image_128"` | ||
Image192 string `json:"image_192"` | ||
Image512 string `json:"image_512"` | ||
Image1024 string `json:"image_1024"` | ||
ImageOriginal string `json:"image_original"` | ||
} | ||
type CallInfo struct { | ||
ID string `json:"id"` | ||
AppID string `json:"app_id"` | ||
AppIconUrls AppIconUrls `json:"app_icon_urls"` | ||
DateStart int `json:"date_start"` | ||
ActiveParticipants []interface{} `json:"active_participants"` | ||
AllParticipants []interface{} `json:"all_participants"` | ||
DisplayID string `json:"display_id"` | ||
JoinURL string `json:"join_url"` | ||
DesktopAppJoinURL string `json:"desktop_app_join_url"` | ||
Name string `json:"name"` | ||
CreatedBy string `json:"created_by"` | ||
DateEnd int `json:"date_end"` | ||
Channels []string `json:"channels"` | ||
IsDmCall bool `json:"is_dm_call"` | ||
WasRejected bool `json:"was_rejected"` | ||
WasMissed bool `json:"was_missed"` | ||
WasAccepted bool `json:"was_accepted"` | ||
HasEnded bool `json:"has_ended"` | ||
} | ||
type Call struct { | ||
CallInfo CallInfo `json:"v1"` | ||
MediaBackendType string `json:"media_backend_type"` | ||
Type MessageBlockType `json:"type"` | ||
BlockID string `json:"block_id,omitempty"` | ||
CallID string `json:"call_id"` | ||
Call Call `json:"call"` | ||
} | ||
|
||
// BlockType returns the type of the block | ||
func (s CallBlock) BlockType() MessageBlockType { | ||
return s.Type | ||
} | ||
|
||
// NewCallBlock returns a new instance of a file block | ||
func NewCallBlock(callID string) *CallBlock { | ||
return &CallBlock{ | ||
Type: MBTCall, | ||
CallID: callID, | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package slack | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestNewCallBlock(t *testing.T) { | ||
callBlock := NewCallBlock("ACallID") | ||
assert.Equal(t, string(callBlock.Type), "call") | ||
assert.Equal(t, callBlock.CallID, "ACallID") | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this had some minor conflicts because we had implemented our own call block, but I've replaced it entirely with theirs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✂️