通过Fastlane for Android CD在Slack API中的missing_scope

问题描述 投票:1回答:1

[我正在尝试使用fastlane在android dev中实现CD,以在一些闲置通道上上传我的apk,我曾经制作过一个notif系统,它运行良好,但是当我尝试制作apk发行商时,出现了这个错误:] >

  {"ok":false,"error":"missing_scope","needed":"files:write","provided":"incoming-webhook"}

看起来api需要其他东西,我给了作用域权限如下,但它不起作用:

enter image description here

这里是FastFile内的ruby脚本,我用于生成APK并将其上传到备用频道上

lane :slack_build do
      gradle(task: "assembleRelease")
      slack(message: "Build Successful!")
      upload_to_slack()
end

# Add this to your Fastfile
desc "Upload the APK to Slack channel"
private_lane :upload_to_slack do |options|
      file_path = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
      file_name = file_path.gsub(/\/.*\//,"")
      access_token = "xoxb-961296623494-963876433841-c1PkVmqWSBbDUkbmnbvku4vK"
      channel_name = "test_android_sample"
      sh "echo Uploading " + file_name + " to Slack"
      sh "curl https://slack.com/api/files.upload -F token=\"" + access_token + "\" -F channels=\"" + channel_name + "\" -F title=\"" + file_name + "\" -F filename=\"" + file_name + "\" -F file=@" + file_path
    end

[我正在尝试使用fastlane在android dev中实现CD,以在一些闲置通道上上传我的apk,我曾经制作过一个notif系统,它运行良好,但是当我尝试制作apk发行商时,它给了我...] >

java android kotlin slack fastlane
1个回答
0
投票

似乎我只需要从api-slack网站顶部的黄色警告重新安装应用程序,简单易行:(

© www.soinside.com 2019 - 2024. All rights reserved.