deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Ms-teams always reports branch as defined in server config, not actually used branch

Open lxlang opened this issue 1 year ago • 0 comments

  • Deployer version: 7.3.3
  • Deployment OS: Ubuntu 22.04

Example Config:

import:
  - recipe/laravel.php
  - contrib/ms-teams.php

config:
  application: 'my-app'

  teams_webhook: https://deploy.requestcatcher.com
  teams_text: "_{{user}}_ deploying `{{branch}}` to *{{name}}*"

hosts:
  server:
    name: my-server
    branch: master

after:
  deploy:info:
    - teams:notify

When deploying any other branch then the one defined in server-config, the wrong branch is reported to teams.

$> dep deploy:info --branch test -vv
task deploy:info
[server] info deploying test
done on server
done deploy:info 92ms
task teams:notify
[localhost] run git config --get user.name
[localhost] User Name
done on server
done teams:notify 697ms

The received webhook:

POST / HTTP/1.1
Host: deploy.requestcatcher.com
Accept: */*
Content-Length: 99
Content-Type: application/json
User-Agent: Deployer 7.3.3

{
    "themeColor": "#4d91f7",
    "text": "_User Name_ deploying `master` to *my-server*"
}

Expected behavior:

The given branch name gets reported to teams.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

lxlang avatar Feb 08 '24 16:02 lxlang