Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lxlang opened this issue Feb 8, 2024 · 0 comments

Comments

@lxlang
Copy link

lxlang commented Feb 8, 2024

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant