From cbe286628fd55e28c686cc05b764f372c81cddf2 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Mon, 12 Dec 2022 17:23:17 +0100
Subject: [PATCH] docker/l3d#122 Add better changelog command for Drupal
 projects

---
 ahoy.changelog.yml | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/ahoy.changelog.yml b/ahoy.changelog.yml
index 3b64441..eeebb50 100644
--- a/ahoy.changelog.yml
+++ b/ahoy.changelog.yml
@@ -12,5 +12,20 @@ commands:
       if [ "x$1" != "x" ]; then
         cd $1
       fi
-      dorg-cli maintainer:release-notes $(gen-semver)
-    usage: Same as above but for a drupal.org project.
+      
+      PROJECT=${PWD##*/}
+      TO=$(git tag --sort=committerdate | tail -1)
+      FROM=$(git tag --sort=committerdate | tail -2 | head -1)
+      FORMAT=html
+
+      if [ "x$2" != "x" ]; then
+        FROM=$2
+      fi
+      if [ "x$3" != "x" ]; then
+        FROM=$3
+      fi
+      if [ "x$4" != "x" ]; then
+        FROM=$4
+      fi
+      curl "https://api.drupal-mrn.dev/changelog?project=${PROJECT}&to=${TO}&from=${FROM}&format=${FORMAT}"
+    usage: Same as above but for a drupal.org project. Optional arguments are (1) relative path to project, (2) the from tag, (3) the to tag, (4) the output format.
-- 
GitLab