From cb24c28c26daa6e1fb66c89399d62bfa5fa31fab Mon Sep 17 00:00:00 2001 From: Jason Praful Date: Fri, 5 Dec 2025 14:49:59 +0000 Subject: [PATCH 1/2] use gh token + gh cli for fetching latest releases --- .github/workflows/update-dependencies.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 6f937ed9..012cc9c6 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -12,8 +12,6 @@ jobs: permissions: contents: write pull-requests: write - issues: read - actions: read steps: - name: 🔍 Checkout repository @@ -48,16 +46,18 @@ jobs: - name: 🚀 Get latest SDK releases id: latest-versions + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "🔄 Fetching latest releases..." # Get iOS release - IOS_RELEASE=$(curl -s https://api.github.com/repos/intercom/intercom-ios/releases/latest) + IOS_RELEASE=$(gh api repos/intercom/intercom-ios/releases/latest 2>/dev/null || echo '{}') IOS_VERSION=$(echo "$IOS_RELEASE" | jq -r '.tag_name // "null"') IOS_CHANGELOG=$(echo "$IOS_RELEASE" | jq -r '.body // "No changelog available"') # Get Android release - ANDROID_RELEASE=$(curl -s https://api.github.com/repos/intercom/intercom-android/releases/latest) + ANDROID_RELEASE=$(gh api repos/intercom/intercom-android/releases/latest 2>/dev/null || echo '{}') ANDROID_VERSION=$(echo "$ANDROID_RELEASE" | jq -r '.tag_name // "null"') ANDROID_CHANGELOG=$(echo "$ANDROID_RELEASE" | jq -r '.body // "No changelog available"') @@ -419,12 +419,13 @@ jobs: 🤖 This PR was automatically created by the [Update Dependencies workflow](.github/workflows/update-dependencies.yml). EOF - # Create PR + # Create PR and assign to team if gh pr create \ --title "chore: update Intercom SDK dependencies (${{ steps.update-files.outputs.pr_title_parts }})" \ --body-file pr_body.md \ --head "${{ steps.create-branch.outputs.branch_name }}" \ - --base "main"; then + --base "main" \ + --assignee "@intercom/team-messenger"; then echo "✅ Pull request created successfully!" else echo "❌ Failed to create pull request" From f4fd18de017c5ceb1cfa9182496bc04263b3b779 Mon Sep 17 00:00:00 2001 From: Jason Praful Date: Fri, 5 Dec 2025 15:00:34 +0000 Subject: [PATCH 2/2] make team-messenger reviewer --- .github/workflows/update-dependencies.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 012cc9c6..d9ccc5ec 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -425,7 +425,8 @@ jobs: --body-file pr_body.md \ --head "${{ steps.create-branch.outputs.branch_name }}" \ --base "main" \ - --assignee "@intercom/team-messenger"; then + --assignee "@intercom/team-messenger" \ + --reviewer "intercom/team-messenger"; then echo "✅ Pull request created successfully!" else echo "❌ Failed to create pull request"