File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,15 @@ class crow
161
161
*/
162
162
const json& get_context () const ;
163
163
164
+ /* !
165
+ * @brief set the code release id
166
+ *
167
+ * @param[in] release release id to add to the main context
168
+ *
169
+ * @since 0.0.7
170
+ */
171
+ void set_release (const std::string& release);
172
+
164
173
/* !
165
174
* @brief add elements to the "user" context for future events
166
175
*
Original file line number Diff line number Diff line change @@ -237,6 +237,12 @@ const json& crow::get_context() const
237
237
return m_payload;
238
238
}
239
239
240
+ void crow::set_release ( const std::string & release )
241
+ {
242
+ std::lock_guard<std::mutex> lock (m_payload_mutex);
243
+ m_payload[" release" ] = release;
244
+ }
245
+
240
246
void crow::add_user_context (const json& data)
241
247
{
242
248
std::lock_guard<std::mutex> lock (m_payload_mutex);
You can’t perform that action at this time.
0 commit comments