summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-08-02 14:08:40 +0200
committerRaindropsSys <contact@minteck.org>2023-08-02 14:08:40 +0200
commitab1ca24dc99db147b9a5d0b186771551acc80dfb (patch)
tree7b6ce3984f33256691d1246cb81f7c4d95caa381
parent581503390dd2ded8ea4989e2afaabfcd95a0d2d9 (diff)
downloadhorses-ab1ca24dc99db147b9a5d0b186771551acc80dfb.tar.gz
horses-ab1ca24dc99db147b9a5d0b186771551acc80dfb.tar.bz2
horses-ab1ca24dc99db147b9a5d0b186771551acc80dfb.zip
Updated includes/youtrack/index.js (automated)
-rw-r--r--includes/youtrack/index.js78
1 files changed, 48 insertions, 30 deletions
diff --git a/includes/youtrack/index.js b/includes/youtrack/index.js
index e794883..46fa4d7 100644
--- a/includes/youtrack/index.js
+++ b/includes/youtrack/index.js
@@ -178,38 +178,56 @@ function generateShortName(name) {
if (yt === list[project]["id"]) {
console.log(" Matching!");
- if (gitea['archived']) {
- (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
- archived: true
- }, {
- headers: {
- Authorization: "Bearer " + secrets.youtrack
+ if (yt !== "0-463") {
+ if (gitea['archived']) {
+ if (gitea['private']) {
+ (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
+ archived: true,
+ organization: {
+ id: "297eeed8-a9f2-45f6-8c17-6543f25930bb"
+ }
+ }, {
+ headers: {
+ Authorization: "Bearer " + secrets.youtrack
+ }
+ })).data;
+ } else {
+ (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
+ archived: true,
+ organization: {
+ id: "957f7b0e-3aa3-4c08-9fb2-d708e8b23ff4"
+ }
+ }, {
+ headers: {
+ Authorization: "Bearer " + secrets.youtrack
+ }
+ })).data;
}
- })).data;
- }
+ }
- if (gitea['private']) {
- console.log(" Marking as private");
- (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
- organization: {
- id: "297eeed8-a9f2-45f6-8c17-6543f25930bb"
- }
- }, {
- headers: {
- Authorization: "Bearer " + secrets.youtrack
- }
- })).data;
- } else {
- console.log(" Marking as public");
- (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
- organization: {
- id: "957f7b0e-3aa3-4c08-9fb2-d708e8b23ff4"
- }
- }, {
- headers: {
- Authorization: "Bearer " + secrets.youtrack
- }
- })).data;
+ if (gitea['private']) {
+ console.log(" Marking as private");
+ (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
+ organization: {
+ id: "297eeed8-a9f2-45f6-8c17-6543f25930bb"
+ }
+ }, {
+ headers: {
+ Authorization: "Bearer " + secrets.youtrack
+ }
+ })).data;
+ } else {
+ console.log(" Marking as public");
+ (await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {
+ organization: {
+ id: "957f7b0e-3aa3-4c08-9fb2-d708e8b23ff4"
+ }
+ }, {
+ headers: {
+ Authorization: "Bearer " + secrets.youtrack
+ }
+ })).data;
+ }
}
(await axios.post("https://account.equestria.dev/hub/api/rest/projects/" + prj.id, {