You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run: echo "GITHUB_TOKEN is: ${{ secrets.GITHUB_TOKEN }}"
74
+
93
75
- name: Comment on PR with no spam
94
76
uses: actions/github-script@v8
77
+
env:
78
+
TITLE_FLAG: ${{ env.TITLE_FLAG }}
79
+
PR_TITLE: ${{ env.PR_TITLE }}
80
+
NEW_VERSION: ${{ env.NEW_VERSION }}
81
+
MAIN_VERSION: ${{ env.MAIN_VERSION }}
82
+
BRANCH_VERSION: ${{ env.BRANCH_VERSION }}
83
+
VERSION_TYPE: ${{ env.VERSION_TYPE }}
95
84
with:
96
-
github-token: ${{ secrets.VERSION_BOT }}
85
+
github-token: ${{ secrets.GITHUB_TOKEN }}
97
86
script: |
98
-
// Retrieve variables from the environment
99
-
const titleFlag = process.env.TITLE_FLAG;
100
-
const prNumber = context.issue.number;
101
-
const prTitle = process.env.PR_TITLE;
102
-
const newVersion = process.env.NEW_VERSION;
103
-
const currentVersion = process.env.MAIN_VERSION;
104
-
const branchVersion = process.env.BRANCH_VERSION;
105
-
const versionType = process.env.VERSION_TYPE;
106
-
107
-
// Prepare the message based on the title flag
108
-
let prBody;
109
-
if (titleFlag === "false") {
110
-
prBody = `ARM Version Bot\n **PR title:** ${prTitle}\n **No valid version flag found**. PR title must include either [FEATURE] or [BUGFIX] to auto-increment the version.\n **Please update the PR title** and re-run the workflow.`;
0 commit comments