Skip to content

Commit cb24c28

Browse files
committed
use gh token + gh cli for fetching latest releases
1 parent cf8b1d0 commit cb24c28

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/update-dependencies.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
permissions:
1313
contents: write
1414
pull-requests: write
15-
issues: read
16-
actions: read
1715

1816
steps:
1917
- name: 🔍 Checkout repository
@@ -48,16 +46,18 @@ jobs:
4846
4947
- name: 🚀 Get latest SDK releases
5048
id: latest-versions
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5151
run: |
5252
echo "🔄 Fetching latest releases..."
5353
5454
# Get iOS release
55-
IOS_RELEASE=$(curl -s https://api.github.com/repos/intercom/intercom-ios/releases/latest)
55+
IOS_RELEASE=$(gh api repos/intercom/intercom-ios/releases/latest 2>/dev/null || echo '{}')
5656
IOS_VERSION=$(echo "$IOS_RELEASE" | jq -r '.tag_name // "null"')
5757
IOS_CHANGELOG=$(echo "$IOS_RELEASE" | jq -r '.body // "No changelog available"')
5858
5959
# Get Android release
60-
ANDROID_RELEASE=$(curl -s https://api.github.com/repos/intercom/intercom-android/releases/latest)
60+
ANDROID_RELEASE=$(gh api repos/intercom/intercom-android/releases/latest 2>/dev/null || echo '{}')
6161
ANDROID_VERSION=$(echo "$ANDROID_RELEASE" | jq -r '.tag_name // "null"')
6262
ANDROID_CHANGELOG=$(echo "$ANDROID_RELEASE" | jq -r '.body // "No changelog available"')
6363
@@ -419,12 +419,13 @@ jobs:
419419
🤖 This PR was automatically created by the [Update Dependencies workflow](.github/workflows/update-dependencies.yml).
420420
EOF
421421
422-
# Create PR
422+
# Create PR and assign to team
423423
if gh pr create \
424424
--title "chore: update Intercom SDK dependencies (${{ steps.update-files.outputs.pr_title_parts }})" \
425425
--body-file pr_body.md \
426426
--head "${{ steps.create-branch.outputs.branch_name }}" \
427-
--base "main"; then
427+
--base "main" \
428+
--assignee "@intercom/team-messenger"; then
428429
echo "✅ Pull request created successfully!"
429430
else
430431
echo "❌ Failed to create pull request"

0 commit comments

Comments
 (0)