From bd9481e4e9b03fdb2ee5f42342ca06b33792f7c5 Mon Sep 17 00:00:00 2001 From: Vinod Deolal Date: Tue, 1 Feb 2022 18:03:44 +0530 Subject: [PATCH] added makefile task to create release labels to all the avni product repos --- .gitignore | 1 + Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..eba27cb --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +labelName:= +githubAPI:= https://api.github.com/repos/avniproject +color:= $(if $(color),$(color),1d76db) + +label = \ + curl -X POST $(githubAPI)/$(1)/labels \ + -H "Authorization: token $(token)" \ + -d '{"name":"$(labelName)","color":"$(color)"}' \ + +create_release_label: +ifndef labelName + @echo "Please provide label name" + exit 1 +else + make create_label token=$(GITHUB_TOKEN) labelName=$(labelName) color=$(color) +endif + +create_label: + $(call label,avni-product) + $(call label,avni-client) + $(call label,avni-server) + $(call label,avni-webapp) + $(call label,rules-config) + $(call label,avni-models) + $(call label,rules-server) + $(call label,avni-canned-reports)