From 462b9e28e5ec4720ae342d335d9af8baa573ee10 Mon Sep 17 00:00:00 2001
From: balanprasanth <112931254+balanprasanth@users.noreply.github.com>
Date: Thu, 30 Jan 2025 22:58:55 +0530
Subject: [PATCH 1/2] Update csat.js
Fix: CSAT link
---
.github/workflows/scripts/csat.js | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/scripts/csat.js b/.github/workflows/scripts/csat.js
index fd532e29ae..637110b503 100644
--- a/.github/workflows/scripts/csat.js
+++ b/.github/workflows/scripts/csat.js
@@ -39,16 +39,19 @@ module.exports = async ({ github, context }) => {
baseUrl = CONSTANT_VALUES.MODULE.CSAT.MEDIA_PIPE_BASE_URL;
else
baseUrl = CONSTANT_VALUES.MODULE.CSAT.BASE_URL;
-
- const yesCsat = ` ${CONSTANT_VALUES.MODULE.CSAT.YES}`;
-
- const noCsat = ` ${CONSTANT_VALUES.MODULE.CSAT.NO}`;
- const comment = CONSTANT_VALUES.MODULE.CSAT.MSG + '\n' + yesCsat + '\n' +
- noCsat + '\n';
+
+ const yesCsatparams = new URLSearchParams({
+ [CONSTANT_VALUES.MODULE.CSAT.SATISFACTION_PARAM.toString()]: CONSTANT_VALUES.MODULE.CSAT.YES.toString(),
+ [CONSTANT_VALUES.MODULE.CSAT.ISSUEID_PARAM.toString()]: issue
+ });
+ const yesCsatlink = `${baseUrl}?${yesCsatparams.toString()}`;
+ const noCsatparams = new URLSearchParams({
+ [CONSTANT_VALUES.MODULE.CSAT.SATISFACTION_PARAM.toString()]: CONSTANT_VALUES.MODULE.CSAT.NO.toString(),
+ [CONSTANT_VALUES.MODULE.CSAT.ISSUEID_PARAM.toString()]: issue
+ });
+ const noCsatlink = `${baseUrl}?${noCsatparams.toString()}`;
+ const comment = CONSTANT_VALUES.MODULE.CSAT.MSG + '\n' + `[${CONSTANT_VALUES.MODULE.CSAT.YES.toString()}](${yesCsatlink})` + '\n' +
+ `[${CONSTANT_VALUES.MODULE.CSAT.NO.toString()}](${noCsatlink})` + '\n';
let issueNumber = context.issue.number ?? context.payload.issue.number;
await github.rest.issues.createComment({
issue_number: issueNumber,
@@ -58,4 +61,4 @@ module.exports = async ({ github, context }) => {
});
}
}
-};
\ No newline at end of file
+};
From 45fd2a1f6e28bc49e0479f2d14ba97f34568156c Mon Sep 17 00:00:00 2001
From: balanprasanth <112931254+balanprasanth@users.noreply.github.com>
Date: Thu, 30 Jan 2025 23:05:31 +0530
Subject: [PATCH 2/2] Update constant.js
Fix: CSAT issue fix
---
.github/workflows/scripts/constant.js | 60 +++++++++++++--------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/.github/workflows/scripts/constant.js b/.github/workflows/scripts/constant.js
index e6019d7de4..983d3e70fa 100644
--- a/.github/workflows/scripts/constant.js
+++ b/.github/workflows/scripts/constant.js
@@ -13,35 +13,35 @@ You may obtain a copy of the License at
limitations under the License.
*/
let CONSTANT_VALUES = {
- GLOBALS: {
- LABELS: {
- STALE: 'stale',
- AWAITINGRES: 'stat:awaiting response',
- BUG: 'type:bug',
- BUG_INSTALL: 'type:build/install',
- TYPE_SUPPORT: 'type:support',
- TYPE_OTHER: 'type:others',
- TYPE_DOCS_BUG: 'type:docs-bug',
- TYPE_PERFORMANCE: 'type:performance'
+ GLOBALS: {
+ LABELS: {
+ STALE: 'stale',
+ AWAITINGRES: 'stat:awaiting response',
+ BUG: 'type:bug',
+ BUG_INSTALL: 'type:build/install',
+ TYPE_SUPPORT: 'type:support',
+ TYPE_OTHER: 'type:others',
+ TYPE_DOCS_BUG: 'type:docs-bug',
+ TYPE_PERFORMANCE: 'type:performance'
+ },
+ STATE: {CLOSED: 'closed'},
+ TENSORFLOW_CORE_REPO: 'https://github.com/tensorflow/tensorflow/pull',
+ PR_TRIGGER_REPO: 'testRep,keras'
},
- STATE: {CLOSED: 'closed'},
- TENSORFLOW_CORE_REPO: 'https://github.com/tensorflow/tensorflow/pull',
- PR_TRIGGER_REPO: 'testRep,keras'
- },
- MODULE: {
- CSAT: {
- YES: 'Yes',
- NO: 'No',
- BASE_URL:
- 'https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPG' +
- 'k4kc1-qMdv3gc6bEP90vY1ew/viewform?',
- MEDIA_PIPE_BASE_URL:
- 'https://docs.google.com/forms/d/e/1FAIpQLScOLT8zeBHummIZFnfr9wqvxYzWD1DAypyvNia5WVIWtFANYg/viewform?',
- SATISFACTION_PARAM: 'entry.85265664=',
- ISSUEID_PARAM: '&entry.2137816233=',
- MSG: 'Are you satisfied with the resolution of your issue?',
+ MODULE: {
+ CSAT: {
+ YES: 'Yes',
+ NO: 'No',
+ BASE_URL:
+ 'https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPG' +
+ 'k4kc1-qMdv3gc6bEP90vY1ew/viewform',
+ MEDIA_PIPE_BASE_URL:
+ 'https://docs.google.com/forms/d/e/1FAIpQLScOLT8zeBHummIZFnfr9wqvxYzWD1DAypyvNia5WVIWtFANYg/viewform',
+ SATISFACTION_PARAM: 'entry.85265664',
+ ISSUEID_PARAM: 'entry.2137816233',
+ MSG: 'Are you satisfied with the resolution of your issue?',
+ }
}
- }
-
-};
-module.exports = CONSTANT_VALUES;
\ No newline at end of file
+
+ };
+ module.exports = CONSTANT_VALUES;