Module: kamailio
Branch: master
Commit: 9eeab4396d8ec57781244ab80c4a96539d7338ec
URL: https://github.com/kamailio/kamailio/commit/9eeab4396d8ec57781244ab80c4a965…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-28T10:20:41+01:00
jansson: docs updated for jansson_get_field()
---
Modified: src/modules/jansson/doc/jansson_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9eeab4396d8ec57781244ab80c4a965…
Patch: https://github.com/kamailio/kamailio/commit/9eeab4396d8ec57781244ab80c4a965…
---
diff --git a/src/modules/jansson/doc/jansson_admin.xml b/src/modules/jansson/doc/jansson_admin.xml
index debc9cc5a19..daa5e9ea51e 100644
--- a/src/modules/jansson/doc/jansson_admin.xml
+++ b/src/modules/jansson/doc/jansson_admin.xml
@@ -56,10 +56,16 @@
<title>Functions</title>
<section id="jansson.f.jansson_get">
<title>
- <function moreinfo="none">jansson_get(key/path, src, dst)</function>
+ <function moreinfo="none">jansson_get(path, src, dst)</function>
</title>
<para>
- Copy the value at the location 'path' from the json object 'src' and store it in pvar 'dst'.
+ Copy the value at the location 'path' from the json object 'src'
+ and store it in variable 'dst'. The path can also be a simple field name
+ (a key), if it does not include any path separator. To retrieve the
+ value of a field that includes path separators in the name, use
+ jansson_get_field().
+ </para>
+ <para>
The 'src' can be a static string or a dynamic string with variables.
</para>
<para>
@@ -71,7 +77,7 @@
</para>
<para>
The function can put a string, integer, null, or new json string into destination.
- If the key/path can't be found in the JSON data structure, the pvar is not changed.
+ If the path can't be found in the JSON data structure, the pvar is not changed.
If it had a previous
value, that value remains unchanged.
</para>
@@ -280,22 +286,27 @@ jansson_xencode("a", "$var(js)");
</section>
<section id="jansson.f.jansson_get_field">
<title>
- <function moreinfo="none">jansson_get_field(src, field_name, dst)</function>
+ <function moreinfo="none">jansson_get_field(field_name, src, dst)</function>
</title>
<para>
- Copy field 'field_name' from json object 'src' and store it in pvar 'dst'.
+ Copy the value of the field 'field_name' from json object 'src'
+ and store it in pvar 'dst'. The field name is not evaluated as JSON
+ path, therefore it has a different behaviour than jansson_get() and
+ can be used when the field name contains path delimiters.
</para>
<para>
- <emphasis>This function is deprecated</emphasis> but kept for backwards compatibility.
- Right now it is just a wrapper around <function>jansson_get</function>, and its
- functionality is the same.
+ Note that till version 5.7.x, this function was similar to jansson_get(),
+ after that its behaviour changed to work as described above. Also,
+ the order of parameters changed.
</para>
<example>
<title><function>jansson_get_field</function> usage</title>
<programlisting format="linespecific">
...
-jansson_get_field("{'foo':'bar'}", "foo", "$var(foo)");
+jansson_get_field("foo", "{'foo':'bar'}", "$var(foo)");
xlog("foo is $var(foo)");
+jansson_get_field("foo.foz", "{'foo.foz':'bar.buz'}", "$var(foofoz)");
+xlog("foo.foz is $var(foofoz)");
...
</programlisting>
</example>
Hello,
during the Kamailio Development Meeting that took place in Dusseldorf
earlier this month, one topic was related to administrative tasks
related to project development and management, how to
simplify/automatize such tasks.
To reduce the work load on volunteering contributors, GitHub Actions
were already used for various tasks related to project development and
management (e.g., automatic builds on commits and pull requests to
detect compile errors or code formatting mistakes).
In Dusseldorf another task was configured to be managed with GitHub
Actions, respectively the check of open issues and pull requests to
evaluate the interest of submitters, developers and community users to
pursue them. If there is no activity on an issue (potential bug or
feature request) or a pull request, after 6 weeks it is marked with the
label `stale`. After two more weeks of no activity, the issue or the
pull request is marked with the label `expired` and closed. Note that
any comment postpones the expire timeline, being considered that there
is interest in pursuing the issue or the pull request.
Requests for features were already treated in this way: if nobody
commits to implement it, it can be closed after one month, but it needed
manual work and many were still kept open. Potential bug reports that
become very old are hard to tackle if the source code changes or new
major releases are out, they might even not be valid anymore.
Anyhow, this automatic operations can be reverted if there is still
interest in pursuing the specific issues or pull requests. A registered
developer can remove labels and reopen a closed issue or pull request.
The non-registered-developer contributors have to make a comment that
includes the token `/notstale` to remove the label `stale` or includes
the token `/notexpired` to reopen a closed item.
This new kind of automatic task management might add a little
inconvenience because one has to restate the interest from time to time
for those items that could not be addressed. However, considering that
Kamailio is an open source collaborative project, in order to be fair
for those that volunteer to spend time and resources for development of
Kamailio, also the users/submitters have to stay engaged, not just
report and forget about.
The process to automatize tasks related to Kamailio development and
administration is work in progress. Everything can be adjusted based on
feedback (e.g., time lines), feel free to suggest improvements or new
solutions to make things easier for everyone within the project ecosystem.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com
Module: kamailio
Branch: master
Commit: 4840ea7536610d07ad6fda76da60ded04dfeabc7
URL: https://github.com/kamailio/kamailio/commit/4840ea7536610d07ad6fda76da60ded…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-27T19:23:36+01:00
.github/CONTRIBUTING.md: section for issue and pr automatic management
---
Modified: .github/CONTRIBUTING.md
---
Diff: https://github.com/kamailio/kamailio/commit/4840ea7536610d07ad6fda76da60ded…
Patch: https://github.com/kamailio/kamailio/commit/4840ea7536610d07ad6fda76da60ded…
---
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 2c5d46842b8..e01dd82c3ce 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -20,6 +20,7 @@ changes to this document in a pull request.
* [Commit Message Examples](#commit-message-examples)
* [See Also](#see-also)
* [Reporting Issues](#reporting-issues)
+ * [Issue And PR Automatic Management](#issue-and-pr-automatic-management)
* [License](#license)
* [License Of New Code Contributions](#license-of-new-code-contributions)
* [Further Assistance](#further-assistance)
@@ -251,6 +252,32 @@ Note: replace any sensitive information in the content you add to the issue
(e.g., passwords in modparams can be replaced with xyz, each IP address can be
replaced with tokens like a.b.c.d, f.g.h.j).
+## Issue And PR Automatic Management ##
+
+This section presents details about the automatic management of potential bug
+reports and requests for new features using github actions.
+
+Kamailio is an open source collaborative project, in order to be fair for those
+that volunteer to spend time and resources for development of Kamailio, the users
+have to stay engaged, not just report and forget about.
+
+To reduce the work load on volunteering contributors, GitHub Actions are used
+for various tasks related to project development and management (e.g., automatic
+builds on commits and pull requests to detect compile errors or code formatting
+mistakes).
+
+One task managed with GitHub Actions is related to the check of open
+issues and pull requests to evaluate the interest of submitter, developers and
+community users. If there is no activity on an issue (potential bug or feature
+request) or a pull request, after 6 weeks it is marked with the label `stale`.
+After two more weeks of no activity, the issue or the pull request is marked
+with the label `expired` and closed.
+
+A registered developer can remove labels and reopen a closed issue or pull
+request. The other contributors have to make a comment that includes the token
+`/notstale` to remove the label `stale` or includes the token `/notexpired` to
+reopen a closed item.
+
## License ##
Kamailio Main License: *GPLv2*.