From 82d2fe2ce8a08c7852a60e8ebd3b0abbfdbeb987 Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Wed, 13 Oct 2021 19:04:03 +0200 Subject: [PATCH 1/2] Add ability to set In-Reply-To tag This is useful to reply to a specific email, e.g. to a patch sent by email on a mailing list. Please note that both the In-Reply-To and the References tags are filled-in. In theory, only the In-Reply-To tag should be enough but they are both linked to the same idea and in theory most emails readers should support a Message-ID given in In-Reply-To tag. So just in case, we fill both to imitate many email clients. Signed-off-by: Matthieu Baerts --- .github/workflows/test.yml | 1 + README.md | 2 ++ action.yml | 3 +++ main.js | 3 +++ 4 files changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e80d64d3..32c40920 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,3 +58,4 @@ jobs: attachments: ${{matrix.attachments}} convert_markdown: ${{matrix.convert_markdown}} priority: high + in_reply_to: diff --git a/README.md b/README.md index 99bd03ad..4e473eeb 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ Some features: bcc: r2d2@example.com,hansolo@example.com # Optional recipient of the email response: reply_to: luke@example.com + # Optional Message ID this message is replying to: + in_reply_to: # Optional unsigned/invalid certificates allowance: ignore_cert: true # Optional converting Markdown to HTML (set content_type to text/html too): diff --git a/action.yml b/action.yml index bd9a09c8..33593b32 100644 --- a/action.yml +++ b/action.yml @@ -44,6 +44,9 @@ inputs: reply_to: description: An email address that will appear on the Reply-To field required: false + in_reply_to: + description: The Message-ID this message is replying to + required: false ignore_cert: description: Allow unsigned/invalid certificates required: false diff --git a/main.js b/main.js index 5707da5d..14c932c3 100644 --- a/main.js +++ b/main.js @@ -51,6 +51,7 @@ async function main() { const cc = core.getInput("cc", { required: false }) const bcc = core.getInput("bcc", { required: false }) const replyTo = core.getInput("reply_to", { required: false }) + const inReplyTo = core.getInput("in_reply_to", { required: false }) const attachments = core.getInput("attachments", { required: false }) const convertMarkdown = core.getInput("convert_markdown", { required: false }) const ignoreCert = core.getInput("ignore_cert", { required: false }) @@ -80,6 +81,8 @@ async function main() { cc: cc ? cc : undefined, bcc: bcc ? bcc : undefined, replyTo: replyTo ? replyTo : undefined, + inReplyTo: inReplyTo ? inReplyTo : undefined, + references: inReplyTo ? inReplyTo : undefined, text: body ? getBody(body, false) : undefined, html: htmlBody ? getBody(htmlBody, convertMarkdown) : undefined, priority: priority ? priority : undefined, From 3aa8f30ebf5b6bc94e18d83faff7c41fc303adc9 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sun, 17 Oct 2021 09:45:45 +0200 Subject: [PATCH 2/2] Update test.yml --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32c40920..e80d64d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,4 +58,3 @@ jobs: attachments: ${{matrix.attachments}} convert_markdown: ${{matrix.convert_markdown}} priority: high - in_reply_to: