aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* ircbot: wait random delay before un-flipping tablesRobin Jarry2024-07-021-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unflipping tables instantly is not very considerate and certainly does not have the same emotional impact compared to waiting for a moment to digest the table flipping. Wait for a random period of time using a log normal distribution: | # | # # | # # | # # | # # | # # # | # # # # | # # # # | # # # # # | # # # # # # | # # # # # # # | # # # # # # # # | # # # # # # # # # # # # | # # # # # # # # # # # # # # # # . . . +----------------------------------------------------- 0 1 2 3 4 5 6 7 8 delay(seconds) Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: implement table unflippingRobin Jarry2024-06-281-0/+6
| | | | | | | | Some IRC users have a tendency to flip tables when they are upset. Improve our bot to put furniture back where it belongs. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: improve karma pluginRobin Jarry2024-06-281-14/+23
| | | | | | | Handle NICK++ and NICK-- in the middle of sentences. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: import upstream karma pluginRobin Jarry2024-06-283-0/+578
| | | | | | | | | Just a copy of the upstream code verbatim. I'll patch the plugin in the next commits. Link: https://github.com/progval/Limnoria/tree/a6aa553/plugins/Karma Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: use tabs for nginx configRobin Jarry2024-06-281-25/+25
| | | | | | | Who indents nginx config files with 8 spaces? Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: update nginx config after sourcehut migrationRobin Jarry2024-06-281-3/+2
| | | | | | | | Since January 2024, Sourcehut infra has moved to the EU. Their IP block was changed. Update our nginx config accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* ircbot: update webhook to handle applied patchesRobin Jarry2024-06-282-23/+102
| | | | | | | | | | | Register another webhook for all received emails and track the X-Sourcehut-Patchset-Update header value. If it is APPLIED, then send an IRC announce accordingly. Use green for "applied" and light gr{e,a}y for "received". Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* release.sh: better list dependency changesRobin Jarry2024-06-182-1/+101
| | | | | | | | | Instead of a dumb diff, add a script to render a pretty list of changed dependency versions. Separate the new and removed dependencies from the version updates. Signed-off-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: put prefix directly after -t flagGregory Anders2024-05-291-1/+1
| | | | | | | | | On macOS the -t option must immediately precede the prefix template or else the generated temp name includes a newline (!), which causes the rest of the sendemail-validate script to fail. Signed-off-by: Gregory Anders <greg@gpanders.com> Acked-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: optionally use patatt to attest patchesMatěj Cepl2024-05-281-1/+8
| | | | | | | | | | | | | | | One weakness of the email based workflow as used on Sourcehut is that git send-email strips all signatures from commits. patatt is not strict equivalent of signed commits, but at least there is a cryptographic attestation that the patch was send by the person it pretends it was sent. Optional, default off, switched on by setting $ git config --bool sendemail.runPatatt true Signed-off-by: Matěj Cepl <mcepl@cepl.eu> Acked-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: add fallback for older gitRobin Jarry2024-04-131-1/+3
| | | | | | | | | | | | Before version 2.41, the sendemail-validate script can only be used to validate patches one by one, even when sending patch series. Set both GIT_SENDEMAIL_FILE_{COUNTER,TOTAL} to 1 in case they are not defined to avoid obscure errors. At least with older git versions, single patch validation should be possible. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* mk: add validate targetRobin Jarry2024-03-041-3/+1
| | | | | | | | | | Instead of hiding the actual checks deep into the CI framework and into the sendemail-validate hook, add a validate make target that uses proper variables and runs the required checks. Use it in the sendemail-validate hook and the CI builds. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* contrib: use sed -E for shell scriptsMaarten Aertsen2024-02-294-11/+11
| | | | | | | | | The + character is not part of the 'basic regular expressions' in BSD grep. Use -E to enable extended (modern) regular expressions. Also remove escaping. This makes the commit msg hook work on macOS 14.2. Signed-off-by: Maarten Aertsen <maarten@nlnetlabs.nl> Signed-off-by: Robin Jarry <robin@jarry.cc>
* release: improve generated emailRobin Jarry2024-02-261-34/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not hard wrap changelog entries. * Add changes to go.mod to help downstream packagers * Improve dry run to show the generated email instead of just printing the changelog. Example output for 0.17.0: From: Robin Jarry <robin@jarry.cc> To: aerc-annouce <~rjarry/aerc-announce@lists.sr.ht> Cc: aerc-devel <~rjarry/aerc-devel@lists.sr.ht> Bcc: aerc <~sircmpwn/aerc@lists.sr.ht>, Robin Jarry <robin@jarry.cc> Reply-To: aerc-devel <~rjarry/aerc-devel@lists.sr.ht> Subject: aerc 0.17.0 User-Agent: aerc/0.17.0 Message-ID: <20240201091423.4YZK4ZQ3XVKJ@ringo> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Hi all, I am glad to announce the release of aerc 0.17.0. https://git.sr.ht/~rjarry/aerc/refs/0.17.0 Release highlights: # Added - New `flagged` criteria for `:sort`. - New `:send-keys` command to control embedded terminals. - Account aliases now support fnmatch-style wildcards. - New `:suspend` command bound to `<C-z>` by default. - Disable parent context bindings by declaring them empty. - Toggle folding with `:fold -t`. - `mail-deleted` hook that triggers when a message is removed/moved from a folder. - `mail-added` hook that triggers when a message is added to a folder. - Customize key to trigger completion with `$complete` in `binds.conf`. - Setting `complete-min-chars=manual` in `aerc.conf` now disables automatic completion, leaving only manually triggered completion. - `.ThreadUnread` is now available in templates. - Allow binding commands to `Alt+<number>` keys. - `AERC_ACCOUNT` and `AERC_ADDRESS_BOOK_CMD` are now defined in the editor's environment when composing a message. - Reply with a different account than the current one with `:reply -A <account>`. - New `[ui].tab-title-viewer` setting to configure the message viewer tab title. - The `{{.Subject}}` template is evaluated to the new option `[ui].empty-subject` if the subject is empty. - Change to a folder of another account with `:cf -a <account> <folder>`. - Patch management with `:patch`. - Add filepath to messages in templates as .Filename(s) - New `:menu` command to invoke other aerc commands based on a shell command output. - CLI flags to override paths to config files. - Automatically attach signing key with `pgp-attach-key` in `accounts.conf`. - Copy messages across accounts with `:cp -a <account> <folder>`. - Move messages across accounts with `:mv -a <account> <folder>`. - Support the `draft` flag. - Thread arrow prefixes are now fully configurable. # Fixed - `colorize` support for wildcards `?` and `*`. - Selection of headers in composer after `:compose -e` followed by `:edit -E`. - Don't lose child messages of non-queried parents in notmuch threads - Notmuch folders defined by the query `*` handle search, filter, and unread counts correctly. # Changed - `:open` commands are now executed with `sh -c`. - `:pipe` commands are now executed with `sh -c`. - Improved command completion. - Message viewer tab titles will now show `(no subject)` if there is no subject in the viewed email. - Signature placement is now controlled via the `{{.Signature}}` template variable and not hardcoded. # Changed dependencies for downstream packagers diff --git a/go.mod b/go.mod index 9b712a340a41..a94a7afa11e0 100644 --- a/go.mod +++ b/go.mod @@ -5,0 +6 @@ require ( + git.sr.ht/~rjarry/go-opt v1.3.0 @@ -7,2 +8 @@ require ( - git.sr.ht/~rockorager/tcell-term v0.8.0 - git.sr.ht/~sircmpwn/getopt v1.0.0 + git.sr.ht/~rockorager/tcell-term v0.10.0 @@ -14 +14 @@ require ( - github.com/emersion/go-maildir v0.3.0 + github.com/emersion/go-maildir v0.4.1 @@ -26 +25,0 @@ require ( - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 @@ -33 +32 @@ require ( - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 @@ -54,0 +54 @@ require ( + golang.org/x/mod v0.8.0 // indirect Thanks to all contributors! ~$ contrib/git-stats.sh 0.16.0..0.17.0 Author Commits Changed Files Insertions Deletions Robin Jarry 61 650 +4908 -5576 Koni Marti 45 120 +4250 -729 Bence Ferdinandy 15 44 +452 -139 Jason Cox 14 59 +490 -232 Moritz Poldrack 11 19 +170 -568 Vitaly Ovchinnikov 11 27 +379 -38 Inwit 9 32 +497 -103 Johannes Thyssen Tishman 5 8 +292 -63 Sebastien Binet 3 5 +36 -25 Michal Siedlaczek 2 5 +66 -43 Erik Terpstra 1 2 +30 +0 George Honeywood 1 2 +3 -3 Jens Grassel 1 1 +8 +0 Karel Balej 1 1 +1 -1 Max Schillinger 1 1 +0 -1 Nojus Gudinavičius 1 5 +64 +0 Thomas Böhler 1 1 +0 -2 delitako 1 5 +30 -18 Reviewer/Tester Commits Robin Jarry 121 Inwit 31 Moritz Poldrack 28 Koni Marti 22 Bence Ferdinandy 13 Johannes Thyssen Tishman 8 Jason Cox 4 Karel Balej 3 Thomas Böhler 3 Tim Culverhouse 3 Vitaly Ovchinnikov 2 Callum Andrew 1 Ciarán Ainsworth 1 Maarten van Gompel 1 Tristan Partin 1 Signed-off-by: Robin Jarry <robin@jarry.cc>
* release.sh: add --dry-run flagRobin Jarry2024-01-261-15/+23
| | | | | | | This allows checking what the changelog will look like when actually releasing. Signed-off-by: Robin Jarry <robin@jarry.cc>
* check-patches: fix non-posix regexJohannes Thyssen Tishman2024-01-251-3/+3
| | | | | | | | | The usage of '+' to match 'one or more occurrences' of a regex is only POSIX compliant when used in an Extended Regular Expression (ERE). Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Acked-by: Robin Jarry <robin@jarry.cc>
* git-stats-graph: fix release datesBence Ferdinandy2024-01-191-1/+3
| | | | | | | | The dates associated with tags and HEAD was always the previous tag. Fix the indexing for date parsing. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: enforce trailer listBence Ferdinandy2024-01-181-0/+27
| | | | | | | | | | | | With the new Changelog-*: trailers it's important that trailers are not misspelled accidentally and to cut down on trailer clutter. Add an explicit list of accepted trailers with their preferred ordering and some explanation where warranted to CONTRIBUTING. Enforce the list in CI. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: enforce prose on changelog entriesBence Ferdinandy2024-01-181-0/+6
| | | | | | | | | | Check if the Changelog-*: trailers have proper English sentences starting with a capital letter and ending in a period. Update CONTRIBUTING with an explicit mention of this. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: check for a prefix in commit titleBence Ferdinandy2024-01-181-0/+4
| | | | | | | | | | The contributing guidelines ask for a use of a short prefix in the commit title. Delegate nitpicking about the existence of the prefix to the CI. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: factorize codeRobin Jarry2024-01-181-7/+12
| | | | | | | Reduce code duplication. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* contrib: add commit-msg git hookRobin Jarry2024-01-171-0/+80
| | | | | | | | | Add a script that deals with the proper formatting and ordering of git trailers. Install it as commit-msg git hook so that everyone can benefit from it. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* sendemail-validate: try regular make if gmake not availableJason Cox2024-01-071-1/+2
| | | | | | | | Some OSes (e.g., Arch Linux) ship GNU Make but only provide the `make` executable. Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
* contrib: fix check-docs for subcommandsKoni Marti2023-12-301-3/+3
| | | | | | | | Fix check-docs linter for subcommands, i.e. where spaces are between the root command and the subcommands such as in ":patch init". Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* lint,validate: fix for openbsdRobin Jarry2023-12-144-22/+35
| | | | | | | | | | | | | | - Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color) - Remove GCC specific flags in sendemail-validate (-Warith-conversion) - Add -std=c99 and -Wpedantic and fix the reported warnings. - Explicitly call gmake everywhere. - Run our custom analyzer standalone. Golangci lint plugins are not supported on OpenBSD. Indirect dependency to golang.org/x/mod is required somehow... Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
* linters: avoid crash when analyzing function callRobin Jarry2023-11-021-19/+50
| | | | | | | | | | | | | | | | | | | | | When encountering a statement such as: go functionName() The identifier is not a local symbol but should be looked up in the current package. Do not consider that all these statements will refer to local variables. The only way to do this is to run a second analyzer that depends on the first one. Store all unresolved methods and functions into a indirectCalls struct. Reuse that result in the second analyzer to resolve the function declarations and check their bodies for the defer log.PanicHandler() statement. Fix one newly reported issues. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
* changelog: get unreleased entries from commit trailersRobin Jarry2023-10-231-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asking contributors to update the CHANGELOG.md file is causing lots of merge conflicts. Introduce a new workflow where contributors can attach changelog entries in patches via git trailers. Changelog-added: For new features. Changelog-fixed: For bug fixes. Changelog-changed: For behaviour or config format changes. Changelog-deprecated: For deprecation or removal of functionality. If a complete trailer is longer than 72 characters, it can be continued by indenting extra lines with a single space. The trailer text must be valid markdown. Update CONTRIBUTING.md with new guidelines. Update contrib/release.sh to extract these trailers before tagging and create a new section in CHANGELOG.md. Extract unreleased entries in this commit to follow the new workflow. Changelog-added: New `flagged` criteria for `:sort`. Changelog-added: New `:send-keys` command to control embedded terminals. Changelog-added: Account aliases now support fnmatch-style wildcards. Changelog-fixed: `colorize` support for wildcards `?` and `*`. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* contrib: add a script to generate release statisticsBence Ferdinandy2023-10-221-0/+120
| | | | | | | | | | | | | | | | | | | | Add a new python script, that will generate two types of statistics for each minor release (and HEAD) from the local repository and create a graph. First statistics is number of commits since the previous release, the second statistics is number of lines inserted and deleted since the previous release. The placement of the text annotations (tag names) is mildly smart, so the distribution changes significantly the hard coded numbers might have to be tweaked. Requires matplotlib to be installed (developed with 3.7.3). It generates a png by default, but this can be changed by passing the output file option with a different file extension as long as matplotlib knows what to do with it. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
* release.sh: fix typoRobin Jarry2023-10-211-2/+2
| | | | | | | It is GNUmakefile, not GNUMakefile. Fixes: d179485eefe5 ("release.sh: update version in GNUMakefile") Signed-off-by: Robin Jarry <robin@jarry.cc>
* carddav-query: interpret percent escapes in source urlRobin Jarry2023-10-131-4/+4
| | | | | | | | | | | | | | | | The username and password must be percent encoded if they are set in carddav-source. Python's parser does not automatically unquote the different URL elements. Some carddav servers do not care about this but some do and report authentication failures when the username is percent encoded. Make sure to unquote the username and password after reading them from carddav-source. Reported-by: Callum Andrew <contact@candrew.net> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Callum Andrew <contact@candrew.net>
* release.sh: fix email encodingRobin Jarry2023-10-131-0/+4
| | | | | | | | | | | | | | | | | | The release emails are sent without any Content-Transfer-Encoding nor Content-Type headers. This causes non-ASCII characters to be rendered as garbage by email clients. Here are two examples from the latest release: Mat��j Cepl Nojus Gudinavi��ius Everything is UTF-8 locally, state it explicitly in the email. Use 8bit as transfer encoding since we are not quoting anything. Add a From: header since some sendmail implementations do not add a default value when it is missing. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* release.sh: update version in GNUMakefileRobin Jarry2023-10-111-2/+2
| | | | | | | | | | | | The version is no longer present in Makefile which has been preserved for explicit error reporting with non-GNU make versions. Update the version in GNUMakefile instead. Fixes: d725defa07b5 ("mk: deprecate BSD make in favor of GNU make") Reported-by: Anton Mosich <anton@mosich.at> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* check-patches: complain if title is longer than 72 charactersBence Ferdinandy2023-09-271-0/+5
| | | | | | | | | | | | Although git commit titles can be a lot longer that 72 characters it is sensible to limit it somewhere. Many people recommend a maximum of 50 characters, other places allow for slightly longer, github for examples truncates titles at 72, our benevolent maintainer tries to aim for 60. Considering the above 72 seems like a comfortable hard limit. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* contrib: add script to check man pages consistencyRobin Jarry2023-09-191-0/+59
| | | | | | | | | | | | | | | Add a new shell script to check that all commands are documented in man pages and that the man pages do not contain non-existent commands. Also check that all explicitly parsed options with ini reflection are documented as well. It is not possible to check if the man pages do reference non-existent options since some of the options are parsed lazily in workers and some of them are also declared with placeholders (e.g. *column-<name>*). Run the script in the lint target. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* colorize: handle spaces in stylesetRobin Jarry2023-09-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid failure when the styleset [viewer] section contains spaces: ~$ cat foo [viewer] url.fg = #ffffaf url.underline = true header.fg = #af87ff signature.fg = #af87ff diff_meta.fg = #ffffff diff_meta.bold = true diff_chunk.fg = #00cdcd diff_add.fg = #00cd00 diff_del.fg = #cd0000 quote_1.fg = #5fafff quote_2.fg = #ff8700 quote_3.fg = #af87ff quote_4.fg = #ff5fd7 quote_x.fg = #808080 ~$ ./colorize -s foo < bar.eml error: invalid style attribute 'fg ' Be more restrictive with what characters are part of a style attribute. Add test styleset with as much weirdness as possible. Update vectors accordingly. Update sendemail-validate hook to export pedantic CFLAGS. Reported-by: Tristan Partin <tristan@partin.io> Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io> Tested-by: Tristan Partin <tristan@partin.io>
* notmuch: add notmuch bindingsTim Culverhouse2023-08-301-0/+4
| | | | | | | | | aerc is using an unmaintained fork of a not-well-functioning notmuch binding library. Add custom bindings directly into the aerc repo to make them more maintainable and more customizable to our needs. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* contrib: update sendemail-validate hookRobin Jarry2023-08-042-31/+58
| | | | | | | | | With git 2.41, git send-email exports a patch counter to the validate hook. Copy the example hook from git and adapt it for aerc. Link: https://github.com/git/git/commit/3c8d3adeae83 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* contrib: actually fix irc patchset hook when author is not registeredRobin Jarry2023-07-282-4/+6
| | | | | | | | When the author is not registered in sr.ht, the schema object is different. Fixes: 3a73ffb40ed1 ("contrib: fix irc patchset hook when author is not registered") Signed-off-by: Robin Jarry <robin@jarry.cc>
* contrib: fix irc patchset hook when author is not registeredRobin Jarry2023-07-142-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid running into KeyError because the webhook payload does not have a submitter canonicalName field. { "data": { "webhook": { "uuid": "69635b8e-8af5-4292-866b-1e45f75c132a", "event": "PATCHSET_RECEIVED", "date": "2023-07-11T13:55:17.248351983Z", "patchset": { "id": 42569, "subject": "Commands: add :echo command", "version": 1, "prefix": "aerc", "list": { "name": "aerc-devel", "owner": { "canonicalName": "~rjarry" } }, "submitter": {} } } } } Add username and email as fallback values. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
* contrib: add irc bot stuffRobin Jarry2023-07-0110-0/+251
| | | | | | | | | | | Add a small script to install a sourcehut webhook that triggers on patchset reception. Add a limnoria (supybot fork) plugin to receive the webhook requests and send IRC NOTICE messages on the proper channels. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
* contrib: add carddav-query scriptRobin Jarry2023-06-011-0/+268
| | | | | | | | | | | Add a standalone python script to allow querying contacts from a CardDAV compatible server. The script works with python 3.6+ and has no external dependencies. Link: https://sabre.io/dav/building-a-carddav-client/ Link: https://www.rfc-editor.org/rfc/rfc6352 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* goflags.sh: silence errorsRobin Jarry2023-03-091-1/+1
| | | | | | | No need to print errors when notmuch.h is not found. The only point of this script to check if it is available or not. Signed-off-by: Robin Jarry <robin@jarry.cc>
* contrib: fix sendemail validate scriptRobin Jarry2023-03-081-8/+26
| | | | | | | | | | | | | | | | | | The current sendemail-validate script cannot be used for patch series. It works on each patch independently from the others and make it impossible to use when there are inter dependencies. I have submitted an alternate validate script that works on whole series which is still waiting for reviews. In the meantime, propose to use my script which can work. To install it in your environment: curl -Lo ~/.local/bin/git-send-email \ https://paste.sr.ht/blob/cedcf24383022949c8dc5bc1300cf5cbc879b36f echo 'export GIT_EXEC_PATH=$PATH:$(git --exec-path)' >> ~/.profile Link: https://lore.kernel.org/git/20230103231133.64050-1-robin@jarry.cc/ Link: https://paste.sr.ht/~rjarry/7e9a98866ba2c6f34e4169debf4f2c14b574613e Signed-off-by: Robin Jarry <robin@jarry.cc>
* mk: speed up notmuch detectionRobin Jarry2023-03-062-20/+19
| | | | | | | | | | | | | | | Use gcc instead of go to build a basic program and determine if notmuch is available. Building a minimal go program takes more than 300ms on a fast machine. A minimal C counterpart takes less than 100ms. To avoid lag when doing bash completion, avoid running any shell commands directly during make evaluation. Rename check-notmuch.sh to goflags.sh and make that script print the goflags directly. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
* mk: detect if notmuch headers & libs are availableRobin Jarry2023-03-031-0/+20
| | | | | | | | | | Detect if notmuch is available by trying to compile a minimal go program that uses the notmuch.h header and links to libnotmuch.so. If that succeeds, set the default GOFLAGS value to -tags=notmuch. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
* check-patches: report all errorsRobin Jarry2023-02-281-14/+18
| | | | | | | Instead of skipping to the next patch after the first error, report all issues. Change the output to make it more user friendly. Signed-off-by: Robin Jarry <robin@jarry.cc>
* contrib: add linter to check for panic handler in goroutinesRobin Jarry2023-01-061-0/+128
| | | | | | | | | | | | | | | | | If log.PanicHandler() is not installed in a goroutine and a panic occurs, the terminal state is not restored. This causes the panic trace to be unreadable since the terminal is broken. Add a custom analyzer that parses our code and ensures that: defer log.PanicHandler() is the first statement of all functions that are executed in goroutines. Include that linter in golangci config. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* sendemail-validate: fix compat with older git versionsRobin Jarry2023-01-041-6/+6
| | | | | | | | | | Seen with git 2.34: error: unknown option `empty=drop' Check the patch file manually instead and abort early. Signed-off-by: Robin Jarry <robin@jarry.cc>
* sendemail-validate: ignore empty patches from cover letterRobin Jarry2022-12-211-1/+5
| | | | | | Avoid errors by checking cover letters as regular patches. Signed-off-by: Robin Jarry <robin@jarry.cc>
* ci: move check-patches at the end of pipelinesRobin Jarry2022-12-201-1/+1
| | | | | | | This is less important than reporting actual coding errors. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>