From a05366f783ea93cd9797c7ae0a33a2848e2c0aed Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sat, 27 Jan 2024 10:33:01 +0100 Subject: [PATCH] Announce file has been moved to work/ directory This way, it is transmitted from workflow to workflow when there is a problem. --- src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java b/src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java index d2fd55b..38f5f88 100644 --- a/src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java +++ b/src/main/java/io/quarkus/bot/release/step/AnnounceRelease.java @@ -57,13 +57,14 @@ public int run(Context context, Commands commands, GitHub quarkusBotGitHub, Rele comment.append("* Send the announcement to [quarkus-dev@googlegroups.com](mailto:quarkus-dev@googlegroups.com)\n"); comment.append("* Send the announcement to various social networks using https://buffer.com/\n"); - Path announcePath = Path.of("announce-" + releaseInformation.getVersion() + ".txt"); + Path announcePath = Path.of("work", "announce-" + releaseInformation.getVersion() + ".txt"); try { String announceText = Files.readString(announcePath); comment.append("\n\nHere is some content that could help in writing the announcement:\n\n"); comment.append(announceText); } catch (Exception e) { + commands.warning("An error occurred while reading " + announcePath + ": " + e.getMessage() + ". Ignoring."); LOG.warn("An error occurred while reading " + announcePath + ". Ignoring.", e); }