You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,17 @@
2
2
3
3
<!-- MANDATORY INFO: -->
4
4
5
-
- Script name:
6
-
- Version:
5
+
- Script name:
6
+
- Version:
7
7
8
8
<!-- Optional: external dependencies (other than WeeChat and standard interpreter libraries) -->
9
-
- Requirements:
9
+
- Requirements:
10
10
11
11
<!-- Optional: fill only if you are sure that a specific WeeChat version is required -->
12
-
- Min WeeChat version:
12
+
- Min WeeChat version:
13
13
14
14
<!-- Optional: tags for script (see list of tags on https://weechat.org/scripts/), new tags are allowed -->
15
-
- Script tags:
15
+
- Script tags:
16
16
17
17
## Description
18
18
@@ -24,26 +24,26 @@
24
24
25
25
<!-- To fill only if you are adding a new script -->
26
26
27
-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
27
+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
28
28
29
29
-[ ] Single commit, single file added
30
30
-[ ] Commit message: `New script name.py: short description…`
31
31
-[ ] No similar script already exists
32
32
-[ ] Name: max 32 chars, only lower case letters, digits and underscores
33
33
-[ ] Unique name, does not already exist in repository
34
34
-[ ] No shebang on the first line
35
-
-[ ] Comment in script with name/pseudo, e-mail and license
35
+
-[ ] Comment in script with name/pseudo, e-mail and license using [SPDX](https://spdx.dev/) tags (see [Contributing guide](https://github.com/weechat/scripts/blob/main/CONTRIBUTING.md#copyright-and-license))
36
36
-[ ] Only English in code/comments
37
37
-[ ] Pure WeeChat API used, no extra API
38
-
-[ ] Function `hook_process` is used for any blocking call
38
+
-[ ] Function `hook_url`, `hook_process` or `hook_process_hashtable` is used for any blocking call
39
39
-[ ] For Python script: works with Python 3 (Python 2 support is optional)
40
40
-[ ] Score 100 / 100 displayed by [weechat-script-lint](https://github.com/weechat/weechat-script-lint)
41
41
42
42
## Checklist (script update)
43
43
44
44
<!-- To fill only if you are updating an existing script -->
45
45
46
-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
46
+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
47
47
48
48
-[ ] Author has been contacted
49
49
-[ ] Single commit, single file added
@@ -56,7 +56,7 @@
56
56
57
57
<!-- To fill only if you are deleting an existing script -->
58
58
59
-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
59
+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
New scripts are added with pull requests against master branch of this repository, using the pull request template called `Add script`.
21
27
28
+
### Guidelines
29
+
22
30
**Important:** please fill the pull request template and follow **all** these rules, otherwise your new script will be rejected:
23
31
24
32
- pull request:
@@ -34,16 +42,32 @@ New scripts are added with pull requests against master branch of this repositor
34
42
- do **NOT** use the word "weechat" in the script name: for example prefer `notify.py` to `weechat_notify.py` (the script is only for WeeChat)
35
43
- script content:
36
44
- do **NOT** use a shebang on the first line (like `#!/usr/bin/perl`), this is not needed
37
-
- write a comment at the beginning with your name (or pseudo), your e-mail and the chosen license (which must be free)
38
-
- consider using [Semantic versioning](https://semver.org/) (recommended, not mandatory); only digits and dots are allowed in version
45
+
- write a comment at the beginning with your name (or pseudo), your e-mail and the chosen license, which must be free (see [Copyright and license](#copyright-and-license))
46
+
- consider using [Semantic versioning](https://semver.org/) (recommended, not mandatory); only digits and dots are allowed in version
39
47
- use only English for code and comments
40
48
- do **NOT** use an extra API between WeeChat and your script (like Ruby gem "WeeChat"), use the standard WeeChat API only
41
-
- use function [hook_process](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process) or [hook_process_hashtable](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process_hashtable) if your script is doing something blocking (like fetching URL), to not block WeeChat
49
+
- use function [hook_url](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_url) (WeeChat ≥ 4.1.0), [hook_process](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process) or [hook_process_hashtable](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process_hashtable) if your script is doing something blocking (like fetching URL), to not block WeeChat
42
50
- make your Python script compatible with Python 3.x, the support of Python 2.x is now optional
43
51
- use the official WeeChat URL: [https://weechat.org](https://weechat.org) (`https` and no `www.`) in any link to the WeeChat website.
44
52
45
53
Your script is automatically checked in CI, see [Automatic checks on scripts](#automatic-checks-on-scripts).
46
54
55
+
### Copyright and license
56
+
57
+
The copyright and license must be present in header, using [SPDX](https://spdx.dev/) tags, see the [list of licenses](https://spdx.org/licenses/).
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
4
+
5
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0 commit comments