fastlane-plugin-teams_bot 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f397a488cb7eaef4c9e891532b502f016e624a013a34d7f706b302685e33438
|
|
4
|
+
data.tar.gz: 197da4b02ef8b95d1eaaf105900bbac328cbbec0138147f9e0f84719e0dbb310
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dd58790a8834b3e019b7da865f932b4b3e77c6c017cec7be1e1a17594dedc453ee16866c59bc2dffb9c96ba3ac1452b4e1d071a63b978a7283998b01a2c65c3
|
|
7
|
+
data.tar.gz: 520c44546214ea8130552dd80a9979272dcb97ca24437ce7ba23266d3a711eea717a88a7e18cce0d0332442dc510d8558e0c7de3cdde21edf230353df4af0f36
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [1.1.0] - 2026-09-08
|
|
6
|
+
|
|
7
|
+
- Preserve query parameters in Microsoft Teams Workflows webhook URLs.
|
|
8
|
+
- Accept the asynchronous HTTP 202 response returned by Power Automate.
|
|
9
|
+
- Modernize the test suite, CI configuration, and gem metadata.
|
|
10
|
+
|
|
11
|
+
## [1.0.0] - 2021-01-20
|
|
12
|
+
|
|
13
|
+
- Initial release.
|
|
14
|
+
|
|
15
|
+
[1.1.0]: https://github.com/huextrat/fastlane-plugin-teams_bot/compare/v1.0.0...v1.1.0
|
|
16
|
+
[1.0.0]: https://github.com/huextrat/fastlane-plugin-teams_bot/releases/tag/v1.0.0
|
data/README.md
CHANGED
|
@@ -14,17 +14,20 @@ fastlane add_plugin teams_bot
|
|
|
14
14
|
|
|
15
15
|
## About teams_bot
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
This plugin sends MessageCard notifications to a Microsoft Teams channel from a fastlane lane.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Create a webhook with the Microsoft Teams **Workflows** app, then copy its complete HTTP POST URL. See Microsoft's guide to [create incoming webhooks with Workflows](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook#create-webhooks-using-workflows).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The generated URL contains required query parameters such as `api-version` and `sig`; pass the complete URL to `teams_url`.
|
|
22
|
+
|
|
23
|
+
> [!NOTE]
|
|
24
|
+
> Power Automate normally acknowledges a valid request with HTTP 202. This confirms that the workflow accepted the request for asynchronous processing, not that every later workflow step completed successfully.
|
|
22
25
|
|
|
23
26
|
## Usage
|
|
24
27
|
|
|
25
28
|
```ruby
|
|
26
29
|
teams_bot(
|
|
27
|
-
teams_url: "<
|
|
30
|
+
teams_url: "<workflow webhook URL>",
|
|
28
31
|
title: "Welcome from Fastlane",
|
|
29
32
|
text: "Hi there !! I am [Teams Bot](https://github.com/huextrat/fastlane-plugin-teams_bot). I can send messages on Microsoft Teams very easily from Fastlane.",
|
|
30
33
|
activity_title: "Hey",
|
|
@@ -36,7 +39,7 @@ or
|
|
|
36
39
|
|
|
37
40
|
```ruby
|
|
38
41
|
teams_bot(
|
|
39
|
-
teams_url: "<
|
|
42
|
+
teams_url: "<workflow webhook URL>",
|
|
40
43
|
title: "Welcome from Fastlane",
|
|
41
44
|
text: "Hi there !! I am [Teams Bot](https://github.com/huextrat/fastlane-plugin-teams_bot). I can send messages on Microsoft Teams very easily from Fastlane.",
|
|
42
45
|
activity_title: "Hey",
|
|
@@ -81,7 +84,7 @@ fastlane action teams_bot
|
|
|
81
84
|
| text | The message you want to display | TEAMS_MESSAGE_TEXT | |
|
|
82
85
|
| use_markdown | Define to use or not markdown | TEAMS_MESSAGE_USE_MARKDOWN | true |
|
|
83
86
|
| facts | Optional facts (assigned to, due date, status, branch, environment, ...) | TEAMS_MESSAGE_FACTS | [] |
|
|
84
|
-
| teams_url | The URL of the
|
|
87
|
+
| teams_url | The complete URL of the webhook workflow created for your Microsoft Teams channel | TEAMS_MESSAGE_TEAMS_URL | |
|
|
85
88
|
|
|
86
89
|
## Example
|
|
87
90
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
require 'fastlane/action'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'net/http'
|
|
4
|
+
require 'uri'
|
|
2
5
|
|
|
3
6
|
module Fastlane
|
|
4
7
|
module Actions
|
|
@@ -10,13 +13,13 @@ module Fastlane
|
|
|
10
13
|
"themeColor" => params[:theme_color],
|
|
11
14
|
"title" => params[:title],
|
|
12
15
|
"summary" => params[:summary],
|
|
13
|
-
"sections"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
"sections" => [{
|
|
17
|
+
"activityTitle" => params[:activity_title],
|
|
18
|
+
"activitySubtitle" => params[:activity_subtitle],
|
|
19
|
+
"activityImage" => params[:activity_image],
|
|
20
|
+
"text" => params[:text],
|
|
21
|
+
"facts" => params[:facts],
|
|
22
|
+
"markdown" => params[:use_markdown]
|
|
20
23
|
}]
|
|
21
24
|
}
|
|
22
25
|
|
|
@@ -24,22 +27,21 @@ module Fastlane
|
|
|
24
27
|
end
|
|
25
28
|
|
|
26
29
|
def self.send_message(url, payload)
|
|
27
|
-
require 'net/http'
|
|
28
|
-
require 'uri'
|
|
29
30
|
json_headers = { 'Content-Type' => 'application/json' }
|
|
30
31
|
uri = URI.parse(url)
|
|
31
32
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
32
33
|
http.use_ssl = true
|
|
33
|
-
response = http.post(uri.
|
|
34
|
+
response = http.post(uri.request_uri, payload.to_json, json_headers)
|
|
34
35
|
is_message_success(response)
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
def self.is_message_success(response)
|
|
38
|
-
if
|
|
39
|
+
if [200, 202].include?(response.code.to_i)
|
|
39
40
|
UI.message("🍾 The message was sent successfully")
|
|
40
41
|
true
|
|
41
42
|
else
|
|
42
|
-
|
|
43
|
+
error_details = response.body.to_s.empty? ? "No response body" : response.body
|
|
44
|
+
UI.user_error!("⚠️ An error occurred (Status #{response.code}): #{error_details}")
|
|
43
45
|
end
|
|
44
46
|
end
|
|
45
47
|
|
|
@@ -104,7 +106,7 @@ module Fastlane
|
|
|
104
106
|
env_name: "TEAMS_MESSAGE_TEAMS_URL",
|
|
105
107
|
sensitive: true,
|
|
106
108
|
optional: false,
|
|
107
|
-
description: "The URL of the
|
|
109
|
+
description: "The URL of the webhook workflow you created for your Microsoft Teams channel",
|
|
108
110
|
verify_block: proc do |value|
|
|
109
111
|
UI.user_error!("Invalid URL, must start with https://") unless value.start_with?("https://")
|
|
110
112
|
end)
|
|
@@ -114,7 +116,7 @@ module Fastlane
|
|
|
114
116
|
def self.example_code
|
|
115
117
|
[
|
|
116
118
|
'teams_bot(
|
|
117
|
-
teams_url: "https://
|
|
119
|
+
teams_url: "https://prod-00.westeurope.logic.azure.com/workflows/.../invoke?api-version=...&sig=...",
|
|
118
120
|
title: "Welcome from Fastlane",
|
|
119
121
|
summary: "Integration is a success",
|
|
120
122
|
text: "Hi there !! I am [Teams Bot](https://github.com/huextrat/fastlane-plugin-teams_bot). I can send messages on Microsoft Teams very easily from Fastlane.",
|
|
@@ -138,7 +140,7 @@ module Fastlane
|
|
|
138
140
|
end
|
|
139
141
|
|
|
140
142
|
def self.description
|
|
141
|
-
"Easily send a message to a Microsoft Teams channel through
|
|
143
|
+
"Easily send a message to a Microsoft Teams channel through a webhook workflow"
|
|
142
144
|
end
|
|
143
145
|
|
|
144
146
|
def self.details
|
|
@@ -154,7 +156,7 @@ module Fastlane
|
|
|
154
156
|
# If your method provides a return value, you can describe here what it does
|
|
155
157
|
end
|
|
156
158
|
|
|
157
|
-
def self.is_supported?(
|
|
159
|
+
def self.is_supported?(_platform)
|
|
158
160
|
true
|
|
159
161
|
end
|
|
160
162
|
end
|
metadata
CHANGED
|
@@ -1,147 +1,22 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-teams_bot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hugo EXTRAT
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
|
|
14
|
-
name: pry
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: bundler
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rspec
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rspec_junit_formatter
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: rake
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: rubocop
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - '='
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.49.1
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - '='
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.49.1
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: rubocop-require_tools
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - ">="
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - ">="
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: simplecov
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: fastlane
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: 2.171.0
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - ">="
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: 2.171.0
|
|
139
|
-
description:
|
|
11
|
+
date: 2026-09-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
140
14
|
email: extrat.h@gmail.com
|
|
141
15
|
executables: []
|
|
142
16
|
extensions: []
|
|
143
17
|
extra_rdoc_files: []
|
|
144
18
|
files:
|
|
19
|
+
- CHANGELOG.md
|
|
145
20
|
- LICENSE
|
|
146
21
|
- README.md
|
|
147
22
|
- lib/fastlane/plugin/teams_bot.rb
|
|
@@ -151,8 +26,12 @@ files:
|
|
|
151
26
|
homepage: https://github.com/huextrat/fastlane-plugin-teams_bot
|
|
152
27
|
licenses:
|
|
153
28
|
- MIT
|
|
154
|
-
metadata:
|
|
155
|
-
|
|
29
|
+
metadata:
|
|
30
|
+
bug_tracker_uri: https://github.com/huextrat/fastlane-plugin-teams_bot/issues
|
|
31
|
+
changelog_uri: https://github.com/huextrat/fastlane-plugin-teams_bot/blob/main/CHANGELOG.md
|
|
32
|
+
source_code_uri: https://github.com/huextrat/fastlane-plugin-teams_bot
|
|
33
|
+
rubygems_mfa_required: 'true'
|
|
34
|
+
post_install_message:
|
|
156
35
|
rdoc_options: []
|
|
157
36
|
require_paths:
|
|
158
37
|
- lib
|
|
@@ -160,15 +39,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
160
39
|
requirements:
|
|
161
40
|
- - ">="
|
|
162
41
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: '0'
|
|
42
|
+
version: '3.0'
|
|
164
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
44
|
requirements:
|
|
166
45
|
- - ">="
|
|
167
46
|
- !ruby/object:Gem::Version
|
|
168
47
|
version: '0'
|
|
169
48
|
requirements: []
|
|
170
|
-
rubygems_version: 3.
|
|
171
|
-
signing_key:
|
|
49
|
+
rubygems_version: 3.5.16
|
|
50
|
+
signing_key:
|
|
172
51
|
specification_version: 4
|
|
173
52
|
summary: Easily alert a Microsoft Teams channel
|
|
174
53
|
test_files: []
|