From fc08e37f14e96a19abd459830f9a01950a806e1d Mon Sep 17 00:00:00 2001 From: vamshi Date: Mon, 23 Feb 2026 21:36:21 +0530 Subject: [PATCH 1/5] ci(bot): Add Webex Space release notification workflow Sends release notifications to a Webex Space after Deploy CD completes. Uses yarn package-tools for recursive package detection. Co-authored-by: Cursor --- .../workflows/webex-space-notification.yml | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 .github/workflows/webex-space-notification.yml diff --git a/.github/workflows/webex-space-notification.yml b/.github/workflows/webex-space-notification.yml new file mode 100644 index 00000000000..dc036e579a1 --- /dev/null +++ b/.github/workflows/webex-space-notification.yml @@ -0,0 +1,142 @@ +name: Webex Space Release Notification +run-name: ${{ github.actor }} triggered Webex space notification + +on: + workflow_dispatch: + inputs: + test_version: + description: 'Test version number (e.g., 3.10.0)' + required: false + default: '3.10.0' + test_pr_number: + description: 'Test PR number (e.g., 123)' + required: false + default: '' + workflow_run: + workflows: ["Deploy CD"] + types: + - completed + branches: + - next + +jobs: + notify-webex-space: + name: Send Webex Space Notification + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get Version and PR from Tag + id: tag-info + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ github.event.inputs.test_version }}" + PR_NUMBER="${{ github.event.inputs.test_pr_number }}" + echo "๐Ÿงช TEST MODE: version=${VERSION}, pr=${PR_NUMBER}" + else + git fetch --tags + VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + if [ -z "$VERSION" ]; then + echo "โŒ No tags found" + exit 1 + fi + TAG_MESSAGE=$(git tag -l --format='%(contents:subject)' "$VERSION") + PR_NUMBER=$(echo "$TAG_MESSAGE" | grep -oE '#[0-9]+' | head -1 | tr -d '#') + COMMIT_HASH=$(echo "$TAG_MESSAGE" | awk '{print $1}') + echo "๐Ÿ“ฆ Tag: ${VERSION}, PR: #${PR_NUMBER}, Commit: ${COMMIT_HASH}" + echo "commit_hash=${COMMIT_HASH}" >> $GITHUB_OUTPUT + fi + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT + echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT + + - name: Build Package Tools + run: | + yarn install + yarn build:tools + + - name: Get Packages + id: get-packages + run: | + PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" + + if [ -z "$PR_NUMBER" ]; then + echo "โŒ No PR number found, using default package" + echo "packages=[\"webex\"]" >> $GITHUB_OUTPUT + echo "primary_package=webex" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "โœ… Getting packages for PR #${PR_NUMBER}" + + # Get packages with --recursive to include dependent packages (like webex) + PACKAGES=$(yarn package-tools list --recursive --since origin/next 2>/dev/null || echo "webex") + + echo "๐Ÿ“ฆ Detected packages: ${PACKAGES}" + + # Convert comma-separated to JSON array + PACKAGES_JSON=$(echo "$PACKAGES" | tr ',' '\n' | sed 's/.*/"&"/' | tr '\n' ',' | sed 's/,$//' | sed 's/^/[/' | sed 's/$/]/') + + echo "packages=${PACKAGES_JSON}" >> $GITHUB_OUTPUT + + # Check if webex is in the packages list + if echo "$PACKAGES" | grep -q "webex"; then + echo "primary_package=webex" >> $GITHUB_OUTPUT + echo "โœ… webex detected in packages" + else + # Use first package + PRIMARY=$(echo "$PACKAGES" | tr ',' '\n' | head -1) + echo "primary_package=${PRIMARY}" >> $GITHUB_OUTPUT + echo "๐Ÿ“ฆ Primary package: ${PRIMARY}" + fi + + - name: Post Webex Space Message + env: + WEBEX_BOT_TOKEN: ${{ secrets.WEBEX_BOT_TOKEN }} + WEBEX_ROOM_ID: ${{ secrets.WEBEX_ROOM_ID }} + run: | + VERSION="${{ steps.tag-info.outputs.version }}" + VERSION_NUMBER="${{ steps.tag-info.outputs.version_number }}" + COMMIT_HASH="${{ steps.tag-info.outputs.commit_hash }}" + PRIMARY_PACKAGE="${{ steps.get-packages.outputs.primary_package }}" + PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" + + # Calculate stable version (strip -next.X suffix) + STABLE_VERSION=$(echo "$VERSION_NUMBER" | sed 's/-next\..*//') + + # Build changelog URL + CHANGELOG_URL="https://web-sdk.webex.com/changelog/?stable_version=${STABLE_VERSION}" + + # Add package parameter + if [ -n "${PRIMARY_PACKAGE}" ]; then + ENCODED_PACKAGE=$(node -e "console.log(encodeURIComponent(process.argv[1]))" "${PRIMARY_PACKAGE}") + CHANGELOG_URL="${CHANGELOG_URL}&package=${ENCODED_PACKAGE}" + fi + + # Add version parameter + if [ -n "${VERSION_NUMBER}" ]; then + CHANGELOG_URL="${CHANGELOG_URL}&version=${VERSION_NUMBER}" + fi + + echo "๐Ÿ”— Changelog URL: ${CHANGELOG_URL}" + + # Build the message - simple format: SDK version, PR link, Changelog link + PR_LINK="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}" + + MESSAGE="**SDK Version:** ${VERSION}\n\n**PR:** ${PR_LINK}\n\n**Changelog:** ${CHANGELOG_URL}" + + echo "๐Ÿ“จ Sending message to Webex Space..." + + curl -sSf \ + -H "Authorization: Bearer ${WEBEX_BOT_TOKEN}" \ + -H "Content-Type: application/json" \ + -d "{\"roomId\":\"${WEBEX_ROOM_ID}\",\"markdown\":\"${MESSAGE}\"}" \ + https://webexapis.com/v1/messages + + echo "โœ… Message sent successfully!" From fb566772cffe5f12e1fcdd6727553dfce701cff2 Mon Sep 17 00:00:00 2001 From: vamshi Date: Wed, 11 Mar 2026 11:48:12 +0530 Subject: [PATCH 2/5] ci: add webex space notification workflow --- .github/workflows/webex-space-bot.yml | 142 ++++++++++++++++++ .../workflows/webex-space-notification.yml | 95 ++++-------- 2 files changed, 175 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/webex-space-bot.yml diff --git a/.github/workflows/webex-space-bot.yml b/.github/workflows/webex-space-bot.yml new file mode 100644 index 00000000000..84ba55fed57 --- /dev/null +++ b/.github/workflows/webex-space-bot.yml @@ -0,0 +1,142 @@ +name: Webex Space Release Notification +run-name: ${{ github.actor }} triggered Webex space notification + +on: + workflow_dispatch: + inputs: + test_version: + description: 'Test version number (e.g., 3.10.0)' + required: false + default: '3.10.0' + test_pr_number: + description: 'Test PR number (e.g., 123)' + required: false + default: '' + workflow_run: + workflows: ["Deploy CD"] + types: + - completed + branches: + - next + +jobs: + notify-webex-space: + name: Send Webex Space Notification + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get Version and PR from Tag + id: tag-info + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ github.event.inputs.test_version }}" + PR_NUMBER="${{ github.event.inputs.test_pr_number }}" + echo "๐Ÿงช TEST MODE: version=${VERSION}, pr=${PR_NUMBER}" + else + git fetch --tags + VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + if [ -z "$VERSION" ]; then + echo "โŒ No tags found" + exit 1 + fi + TAG_MESSAGE=$(git tag -l --format='%(contents:subject)' "$VERSION") + PR_NUMBER=$(echo "$TAG_MESSAGE" | grep -oE '#[0-9]+' | head -1 | tr -d '#') + COMMIT_HASH=$(echo "$TAG_MESSAGE" | awk '{print $1}') + echo "๐Ÿ“ฆ Tag: ${VERSION}, PR: #${PR_NUMBER}, Commit: ${COMMIT_HASH}" + echo "commit_hash=${COMMIT_HASH}" >> $GITHUB_OUTPUT + fi + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT + echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT + + - name: Build Package Tools + run: | + yarn install + yarn build:tools + + - name: Get Packages + id: get-packages + run: | + PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" + + if [ -z "$PR_NUMBER" ]; then + echo "โŒ No PR number found, using default package" + echo "packages=[\"webex\"]" >> $GITHUB_OUTPUT + echo "primary_package=webex" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "โœ… Getting packages for PR #${PR_NUMBER}" + + # Get packages with --recursive to include dependent packages (like webex) + PACKAGES=$(yarn package-tools list --recursive --since origin/next 2>/dev/null || echo "webex") + + echo "๐Ÿ“ฆ Detected packages: ${PACKAGES}" + + # Convert comma-separated to JSON array + PACKAGES_JSON=$(echo "$PACKAGES" | tr ',' '\n' | sed 's/.*/"&"/' | tr '\n' ',' | sed 's/,$//' | sed 's/^/[/' | sed 's/$/]/') + + echo "packages=${PACKAGES_JSON}" >> $GITHUB_OUTPUT + + # Check if webex is in the packages list + if echo "$PACKAGES" | grep -q "webex"; then + echo "primary_package=webex" >> $GITHUB_OUTPUT + echo "โœ… webex detected in packages" + else + # Use first package + PRIMARY=$(echo "$PACKAGES" | tr ',' '\n' | head -1) + echo "primary_package=${PRIMARY}" >> $GITHUB_OUTPUT + echo "๐Ÿ“ฆ Primary package: ${PRIMARY}" + fi + + - name: Post Webex Space Message + env: + WEBEX_BOT_TOKEN: ${{ secrets.WEBEX_BOT_TOKEN }} + WEBEX_ROOM_ID: ${{ secrets.WEBEX_ROOM_ID }} + run: | + VERSION="${{ steps.tag-info.outputs.version }}" + VERSION_NUMBER="${{ steps.tag-info.outputs.version_number }}" + COMMIT_HASH="${{ steps.tag-info.outputs.commit_hash }}" + PRIMARY_PACKAGE="${{ steps.get-packages.outputs.primary_package }}" + PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" + + # Calculate stable version (strip -next.X suffix) + STABLE_VERSION=$(echo "$VERSION_NUMBER" | sed 's/-next\..*//') + + # Build changelog URL + CHANGELOG_URL="https://web-sdk.webex.com/changelog/?stable_version=${STABLE_VERSION}" + + # Add package parameter + if [ -n "${PRIMARY_PACKAGE}" ]; then + ENCODED_PACKAGE=$(node -e "console.log(encodeURIComponent(process.argv[1]))" "${PRIMARY_PACKAGE}") + CHANGELOG_URL="${CHANGELOG_URL}&package=${ENCODED_PACKAGE}" + fi + + # Add version parameter + if [ -n "${VERSION_NUMBER}" ]; then + CHANGELOG_URL="${CHANGELOG_URL}&version=${VERSION_NUMBER}" + fi + + echo "๐Ÿ”— Changelog URL: ${CHANGELOG_URL}" + + # Build the message - simple format: SDK version, PR link, Changelog link + PR_LINK="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}" + + MESSAGE="**SDK Version:** ${VERSION}\n\n**PR:** ${PR_LINK}\n\n**Changelog:** ${CHANGELOG_URL}" + + echo "๐Ÿ“จ Sending message to Webex Space..." + + curl -sSf \ + -H "Authorization: Bearer ${WEBEX_BOT_TOKEN}" \ + -H "Content-Type: application/json" \ + -d "{\"roomId\":\"${WEBEX_ROOM_ID}\",\"markdown\":\"${MESSAGE}\"}" \ + https://webexapis.com/v1/messages + + echo "โœ… Message sent successfully!" \ No newline at end of file diff --git a/.github/workflows/webex-space-notification.yml b/.github/workflows/webex-space-notification.yml index dc036e579a1..d01ded524c7 100644 --- a/.github/workflows/webex-space-notification.yml +++ b/.github/workflows/webex-space-notification.yml @@ -56,45 +56,38 @@ jobs: echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT - - name: Build Package Tools - run: | - yarn install - yarn build:tools - - - name: Get Packages - id: get-packages - run: | - PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" - - if [ -z "$PR_NUMBER" ]; then - echo "โŒ No PR number found, using default package" - echo "packages=[\"webex\"]" >> $GITHUB_OUTPUT - echo "primary_package=webex" >> $GITHUB_OUTPUT - exit 0 - fi - - echo "โœ… Getting packages for PR #${PR_NUMBER}" - - # Get packages with --recursive to include dependent packages (like webex) - PACKAGES=$(yarn package-tools list --recursive --since origin/next 2>/dev/null || echo "webex") - - echo "๐Ÿ“ฆ Detected packages: ${PACKAGES}" - - # Convert comma-separated to JSON array - PACKAGES_JSON=$(echo "$PACKAGES" | tr ',' '\n' | sed 's/.*/"&"/' | tr '\n' ',' | sed 's/,$//' | sed 's/^/[/' | sed 's/$/]/') - - echo "packages=${PACKAGES_JSON}" >> $GITHUB_OUTPUT - - # Check if webex is in the packages list - if echo "$PACKAGES" | grep -q "webex"; then - echo "primary_package=webex" >> $GITHUB_OUTPUT - echo "โœ… webex detected in packages" - else - # Use first package - PRIMARY=$(echo "$PACKAGES" | tr ',' '\n' | head -1) - echo "primary_package=${PRIMARY}" >> $GITHUB_OUTPUT - echo "๐Ÿ“ฆ Primary package: ${PRIMARY}" - fi + - name: Get Changelog URL from PR Comment + id: get-changelog + uses: actions/github-script@v7 + with: + script: | + const prNumber = '${{ steps.tag-info.outputs.pr_number }}'; + if (!prNumber) { + console.log('โŒ No PR number, skipping changelog fetch'); + core.setOutput('changelog_url', ''); + return; + } + + const comments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: parseInt(prNumber) + }); + + const botComment = comments.data.find(c => + c.user.type === 'Bot' && + c.body.includes('Your changes are now available') + ); + + if (botComment) { + const match = botComment.body.match(/\[View full changelog[^\]]*\]\(([^)]+)\)/); + const url = match ? match[1] : ''; + console.log(`โœ… Found changelog URL: ${url}`); + core.setOutput('changelog_url', url); + } else { + console.log('โš ๏ธ No bot comment found on PR'); + core.setOutput('changelog_url', ''); + } - name: Post Webex Space Message env: @@ -102,31 +95,9 @@ jobs: WEBEX_ROOM_ID: ${{ secrets.WEBEX_ROOM_ID }} run: | VERSION="${{ steps.tag-info.outputs.version }}" - VERSION_NUMBER="${{ steps.tag-info.outputs.version_number }}" - COMMIT_HASH="${{ steps.tag-info.outputs.commit_hash }}" - PRIMARY_PACKAGE="${{ steps.get-packages.outputs.primary_package }}" PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" + CHANGELOG_URL="${{ steps.get-changelog.outputs.changelog_url }}" - # Calculate stable version (strip -next.X suffix) - STABLE_VERSION=$(echo "$VERSION_NUMBER" | sed 's/-next\..*//') - - # Build changelog URL - CHANGELOG_URL="https://web-sdk.webex.com/changelog/?stable_version=${STABLE_VERSION}" - - # Add package parameter - if [ -n "${PRIMARY_PACKAGE}" ]; then - ENCODED_PACKAGE=$(node -e "console.log(encodeURIComponent(process.argv[1]))" "${PRIMARY_PACKAGE}") - CHANGELOG_URL="${CHANGELOG_URL}&package=${ENCODED_PACKAGE}" - fi - - # Add version parameter - if [ -n "${VERSION_NUMBER}" ]; then - CHANGELOG_URL="${CHANGELOG_URL}&version=${VERSION_NUMBER}" - fi - - echo "๐Ÿ”— Changelog URL: ${CHANGELOG_URL}" - - # Build the message - simple format: SDK version, PR link, Changelog link PR_LINK="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}" MESSAGE="**SDK Version:** ${VERSION}\n\n**PR:** ${PR_LINK}\n\n**Changelog:** ${CHANGELOG_URL}" From dd9258f8c2c3245c38e215c143473ef5c006b2e5 Mon Sep 17 00:00:00 2001 From: vamshi Date: Wed, 11 Mar 2026 12:15:07 +0530 Subject: [PATCH 3/5] ci: remove old workflow file after rename --- .github/workflows/webex-space-bot.yml | 142 -------------------------- 1 file changed, 142 deletions(-) delete mode 100644 .github/workflows/webex-space-bot.yml diff --git a/.github/workflows/webex-space-bot.yml b/.github/workflows/webex-space-bot.yml deleted file mode 100644 index 84ba55fed57..00000000000 --- a/.github/workflows/webex-space-bot.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Webex Space Release Notification -run-name: ${{ github.actor }} triggered Webex space notification - -on: - workflow_dispatch: - inputs: - test_version: - description: 'Test version number (e.g., 3.10.0)' - required: false - default: '3.10.0' - test_pr_number: - description: 'Test PR number (e.g., 123)' - required: false - default: '' - workflow_run: - workflows: ["Deploy CD"] - types: - - completed - branches: - - next - -jobs: - notify-webex-space: - name: Send Webex Space Notification - runs-on: ubuntu-latest - if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get Version and PR from Tag - id: tag-info - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ github.event.inputs.test_version }}" - PR_NUMBER="${{ github.event.inputs.test_pr_number }}" - echo "๐Ÿงช TEST MODE: version=${VERSION}, pr=${PR_NUMBER}" - else - git fetch --tags - VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "") - if [ -z "$VERSION" ]; then - echo "โŒ No tags found" - exit 1 - fi - TAG_MESSAGE=$(git tag -l --format='%(contents:subject)' "$VERSION") - PR_NUMBER=$(echo "$TAG_MESSAGE" | grep -oE '#[0-9]+' | head -1 | tr -d '#') - COMMIT_HASH=$(echo "$TAG_MESSAGE" | awk '{print $1}') - echo "๐Ÿ“ฆ Tag: ${VERSION}, PR: #${PR_NUMBER}, Commit: ${COMMIT_HASH}" - echo "commit_hash=${COMMIT_HASH}" >> $GITHUB_OUTPUT - fi - - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT - echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT - - - name: Build Package Tools - run: | - yarn install - yarn build:tools - - - name: Get Packages - id: get-packages - run: | - PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" - - if [ -z "$PR_NUMBER" ]; then - echo "โŒ No PR number found, using default package" - echo "packages=[\"webex\"]" >> $GITHUB_OUTPUT - echo "primary_package=webex" >> $GITHUB_OUTPUT - exit 0 - fi - - echo "โœ… Getting packages for PR #${PR_NUMBER}" - - # Get packages with --recursive to include dependent packages (like webex) - PACKAGES=$(yarn package-tools list --recursive --since origin/next 2>/dev/null || echo "webex") - - echo "๐Ÿ“ฆ Detected packages: ${PACKAGES}" - - # Convert comma-separated to JSON array - PACKAGES_JSON=$(echo "$PACKAGES" | tr ',' '\n' | sed 's/.*/"&"/' | tr '\n' ',' | sed 's/,$//' | sed 's/^/[/' | sed 's/$/]/') - - echo "packages=${PACKAGES_JSON}" >> $GITHUB_OUTPUT - - # Check if webex is in the packages list - if echo "$PACKAGES" | grep -q "webex"; then - echo "primary_package=webex" >> $GITHUB_OUTPUT - echo "โœ… webex detected in packages" - else - # Use first package - PRIMARY=$(echo "$PACKAGES" | tr ',' '\n' | head -1) - echo "primary_package=${PRIMARY}" >> $GITHUB_OUTPUT - echo "๐Ÿ“ฆ Primary package: ${PRIMARY}" - fi - - - name: Post Webex Space Message - env: - WEBEX_BOT_TOKEN: ${{ secrets.WEBEX_BOT_TOKEN }} - WEBEX_ROOM_ID: ${{ secrets.WEBEX_ROOM_ID }} - run: | - VERSION="${{ steps.tag-info.outputs.version }}" - VERSION_NUMBER="${{ steps.tag-info.outputs.version_number }}" - COMMIT_HASH="${{ steps.tag-info.outputs.commit_hash }}" - PRIMARY_PACKAGE="${{ steps.get-packages.outputs.primary_package }}" - PR_NUMBER="${{ steps.tag-info.outputs.pr_number }}" - - # Calculate stable version (strip -next.X suffix) - STABLE_VERSION=$(echo "$VERSION_NUMBER" | sed 's/-next\..*//') - - # Build changelog URL - CHANGELOG_URL="https://web-sdk.webex.com/changelog/?stable_version=${STABLE_VERSION}" - - # Add package parameter - if [ -n "${PRIMARY_PACKAGE}" ]; then - ENCODED_PACKAGE=$(node -e "console.log(encodeURIComponent(process.argv[1]))" "${PRIMARY_PACKAGE}") - CHANGELOG_URL="${CHANGELOG_URL}&package=${ENCODED_PACKAGE}" - fi - - # Add version parameter - if [ -n "${VERSION_NUMBER}" ]; then - CHANGELOG_URL="${CHANGELOG_URL}&version=${VERSION_NUMBER}" - fi - - echo "๐Ÿ”— Changelog URL: ${CHANGELOG_URL}" - - # Build the message - simple format: SDK version, PR link, Changelog link - PR_LINK="https://github.com/${{ github.repository }}/pull/${PR_NUMBER}" - - MESSAGE="**SDK Version:** ${VERSION}\n\n**PR:** ${PR_LINK}\n\n**Changelog:** ${CHANGELOG_URL}" - - echo "๐Ÿ“จ Sending message to Webex Space..." - - curl -sSf \ - -H "Authorization: Bearer ${WEBEX_BOT_TOKEN}" \ - -H "Content-Type: application/json" \ - -d "{\"roomId\":\"${WEBEX_ROOM_ID}\",\"markdown\":\"${MESSAGE}\"}" \ - https://webexapis.com/v1/messages - - echo "โœ… Message sent successfully!" \ No newline at end of file From 027e4be0fa80e82a3e52ffca33439a5c3cedbd01 Mon Sep 17 00:00:00 2001 From: vamshi Date: Wed, 11 Mar 2026 12:42:12 +0530 Subject: [PATCH 4/5] ci: suppress curl response output to hide UUIDs from logs --- .github/workflows/webex-space-notification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webex-space-notification.yml b/.github/workflows/webex-space-notification.yml index d01ded524c7..59db9daafb5 100644 --- a/.github/workflows/webex-space-notification.yml +++ b/.github/workflows/webex-space-notification.yml @@ -108,6 +108,6 @@ jobs: -H "Authorization: Bearer ${WEBEX_BOT_TOKEN}" \ -H "Content-Type: application/json" \ -d "{\"roomId\":\"${WEBEX_ROOM_ID}\",\"markdown\":\"${MESSAGE}\"}" \ - https://webexapis.com/v1/messages + https://webexapis.com/v1/messages > /dev/null echo "โœ… Message sent successfully!" From b2abd1e91421cbfdd0f059afbb1936ffd4e0a0ff Mon Sep 17 00:00:00 2001 From: vamshi Date: Wed, 11 Mar 2026 13:10:59 +0530 Subject: [PATCH 5/5] ci: remove workflow_dispatch inputs and suppress curl output --- .../workflows/webex-space-notification.yml | 33 +++++-------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/webex-space-notification.yml b/.github/workflows/webex-space-notification.yml index 59db9daafb5..e72182ade74 100644 --- a/.github/workflows/webex-space-notification.yml +++ b/.github/workflows/webex-space-notification.yml @@ -3,15 +3,6 @@ run-name: ${{ github.actor }} triggered Webex space notification on: workflow_dispatch: - inputs: - test_version: - description: 'Test version number (e.g., 3.10.0)' - required: false - default: '3.10.0' - test_pr_number: - description: 'Test PR number (e.g., 123)' - required: false - default: '' workflow_run: workflows: ["Deploy CD"] types: @@ -34,23 +25,15 @@ jobs: - name: Get Version and PR from Tag id: tag-info run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ github.event.inputs.test_version }}" - PR_NUMBER="${{ github.event.inputs.test_pr_number }}" - echo "๐Ÿงช TEST MODE: version=${VERSION}, pr=${PR_NUMBER}" - else - git fetch --tags - VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "") - if [ -z "$VERSION" ]; then - echo "โŒ No tags found" - exit 1 - fi - TAG_MESSAGE=$(git tag -l --format='%(contents:subject)' "$VERSION") - PR_NUMBER=$(echo "$TAG_MESSAGE" | grep -oE '#[0-9]+' | head -1 | tr -d '#') - COMMIT_HASH=$(echo "$TAG_MESSAGE" | awk '{print $1}') - echo "๐Ÿ“ฆ Tag: ${VERSION}, PR: #${PR_NUMBER}, Commit: ${COMMIT_HASH}" - echo "commit_hash=${COMMIT_HASH}" >> $GITHUB_OUTPUT + git fetch --tags + VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + if [ -z "$VERSION" ]; then + echo "โŒ No tags found" + exit 1 fi + TAG_MESSAGE=$(git tag -l --format='%(contents:subject)' "$VERSION") + PR_NUMBER=$(echo "$TAG_MESSAGE" | grep -oE '#[0-9]+' | head -1 | tr -d '#') + echo "๐Ÿ“ฆ Tag: ${VERSION}, PR: #${PR_NUMBER}" echo "version=${VERSION}" >> $GITHUB_OUTPUT echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT