Ms-teams always reports branch as defined in server config, not actually used branch
lxlang opened this issue · comments
Tobias Lang commented
- 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.