getslashdeploy / roadmap

Manage your deployments without leaving Slack
https://getslashdeploy.com
2 stars 0 forks source link

github_ref suddenly disappears #14

Closed legshort closed 3 years ago

legshort commented 4 years ago

Hi there, I suddenly have this problem and ended up here.

as you can see ref which is I used to use github.ref from github action is missing from last night, below screenshot is from echo ${{ toJson(github) }} on Github Action.

image

Also, I checked the Github Deployment detail with id, sha and ref are same, I think ref should be something like refs/head/master.

image

please take a look for me, thanks!

assimovt commented 4 years ago

@legshort Sorry for the delay here, we've been busy with some infra work.

I've checked your issue and it looks like an expected behavior for the way auto-deployments work. When you're deploying manually via /deploy command and give it a Git ref (branch, tag, etc.), internally we're looking up its associated SHA.

With an auto-deployment though, we cannot reliably detect the Git ref, since it's just a label and there can be multiple labels pointing to the same Git SHA. All that SlashDeploy does is it receives a GitHub Push event and uses a provided SHA as a ref, which is why you see it in the GitHub Deployment API request.

Let me know what's your use case and perhaps we could find some other solution to your workflow?

legshort commented 3 years ago

@assimovt thanks for your comment. I would like to know which branch is deployed automatically when I setup like this

auto_deploy:
      ref: refs\/heads\/dev.+

For right now, I couldn't find any solution yet, plz let me know if there is a way to detect the deployed branch.

assimovt commented 3 years ago

@legshort we made some improvements and you should now have a correct ref in the payload. Could you please try if it fixes your issue and sorry for the confusion.

legshort commented 3 years ago

Yeah now we have a correct github ref, thanks for fixing! @assimovt

before image

after image