Git Product home page Git Product logo

devops-vsts-bot's Introduction

Introduction

ALM | DevOps Rangers community Bot is a Bot for Microsoft Teams, Skype and Slack, based on Microsoft Bot Framework. Read VSTS Bot is now in preview for details.

Build Status

Getting Started

  1. Read the documention about Microsoft Bot Framework.
  2. Download the Bot Framework Emulator to help you test.
  3. Download the Cosmos DB which we emulate Cosmos DB on your local machine.
  4. Run Git-Ignore-Changes.bat which will disable tracking of Team-Services-Bot.runsettings and AppSettings.config, so your local information will not get uploaded to the repository.
  5. For the Acceptance tests:
    1. Download ngrok to help run the Acceptance tests.
    2. Run the Team-Services-Bot.Api within Visual Studio, which will run on: http://localhost:3979/
    3. Run
      ngrok http -host-header=rewrite 3979
      
    4. Register a bot. Use the url from ngrok (Example: https://9fddfdcb.ngrok.io/api/messages) as the messaging endpoint.
      Make sure you turn on Direct Line
    5. Register the application with vsts https://app.vsaex.visualstudio.com/app/register?mkt=en-US.
    6. Create / Update src\Team-Services-Bot.runsettings (description can be found on the wiki).
      <?xml version="1.0" encoding="utf-8"?>
      <RunSettings>
        <TestRunParameters>
          <Parameter name="Account" value="" />
          <Parameter name="AppId" value="" />
          <Parameter name="AppSecret" value="" />
          <Parameter name="AuthorizeUrl" value="" />
          <Parameter name="BotId" value="" />
          <Parameter name="BotSecret" value="" />
          <Parameter name="DocumentDbKey" value="C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" />
          <Parameter name="DocumentDbUri" value="https://localhost:8081" />
          <Parameter name="RefreshToken" value="" />
          <Parameter name="RefreshTokenReinitialize" value="false" />
          <Parameter name="TeamProjectOne" value="" />
          <Parameter name="TeamProjectTwo" value="" />
        </TestRunParameters>
      </RunSettings>
    7. Create / Update src\Team-Services-Bot.Api\AppSettings.config (description can be found on the wiki).
      <?xml version="1.0" encoding="utf-8"?>
      <appSettings>
        <!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
        <add key="AppId" value="" />
        <add key="AppSecret" value="" />
        <add key="AppScope" value=""/>
        <add key="AuthorizeUrl" value="" />
        <add key="DocumentDbKey" value="C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" />
        <add key="DocumentDbUri" value="https://localhost:8081" />
        <add key="EmulatorListeningUrl" value="" />
        <add key="InstrumentationKey" value="" />
        <add key="BotId" value="" />
        <add key="MicrosoftAppId" value="" />
        <add key="MicrosoftAppPassword" value="" />
      </appSettings>

Build and Test

Open the Team-Services-Bot.sln in the src folder. It contains the projects and tests, which you can run with the Test Explorer in Visual Studio.

Contributors

We thank the following contributors for this extension: Vladimir Gusarov and Jeffrey Opdam.

Contribute

Contributions to this project are welcome. Here is how you can contribute:

  • Submit bugs and help us verify fixes
  • Submit pull requests for bug fixes and features and discuss existing proposals

Please refer to Contribution guidelines and the Code of Conduct for more details.

Notices

Notices for certain third party software included in this solution are provided here: Third Party Notice.

Data/Telemetry

Please refer to Privacy Policy.

Terms of Use

Please refer to Terms and Conditions of Use.

devops-vsts-bot's People

Contributors

almguru avatar dkmsft avatar jeffrey-opdam avatar mikaelkrief avatar pierowman avatar rjarrattmsft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devops-vsts-bot's Issues

VSTS Bot responses twice every one message. and it doesn't work as expected.

VSTS Bot responses twice every one message. and it doesn't work as expected.

image

Example responses

  • Me: connect
  • VSTS-Bot: Please select an account to connect to. (snip)
  • VSTS-Bot: Please login to Visual Studio Services. After login you will receive a five digit pin ...(snip)
  • VSTS-Bot: Sorry, I do not recognize the provided pin. Please try again.
  • Me: help
  • VSTS-Bot: I am here to help you. Please select one of the following commands. (snip)
  • VSTS-Bot: I am here to help you. Please select one of the following commands. (snip)

Required Permissions

There is a whole list of permissions that are required - Are these really all necessary?

Approvals do not seem to work with groups?

If I define a pre-deployment approval as requiring sign-off from someone in a group, and I am a member of that group, when I run "approvals" I am told there are none. If I am listed explicitly, by name, instead of by group membership, then approvals work as expected.

Not showing approvals for group members is a major issue for us, as we have deployment approvals that require Person X, Person Y, and (A or B or C), and groups is how we express those requirements.

Slack Email doesn't match my VSTS account login - Unable to verify PIN

Hello,

I am trying to add the bot through Slack, and I forgot that my slack email is not by VSTS account email (I'm not sure how everything is associated).

image

So,

  • I hit connect the first time with the wrong email address
  • Realizing the mistake I changed my email address in slack and hit connect again
  • I signed out and signed back into VSTS (actually using a third email address)
  • VSTS asked me to confirm the bot and then presented the pin
  • The bot did accept the and asked if I wanted to join my VSTS account (sist-sa-ucsb)
  • But, I can't run any commands with getting the 'Sorry, I do not recognize the provided pin. Please try again.' message

I then read on of the other issues, and tried ' /deleteprofile'

This time with the correct email (I think), I went back through the Connect step, but VSTS isn't giving me a new PIN. And I keep getting the 'Sorry, I do not recognize the provided pin. Please try again.' message.

Do you have any suggestions?

Thanks

not working?

Hey,

Just wondering if anything is down or I'm missing something as the bot doesn't seem to be working from Slack?

Have added the bot previously and it was working fine. However in the past week have noticed that no commands seem to be working, and from today, slack now reports a failure to send the message.

uninstalling and reinstalling of VSTSBot results in connection problems

I uninstalled the VSTSBot integration and reinstalled it, hoping to pick up the group approvals fix. Unfortunately, I am unable to connect the bot to the account again. When I type connect, it shows the existing project that it used to be connected to prior to uninstall, and then when I select that project it errors out complaining of null parameters:
screen shot 2018-02-08 at 10 21 58 am

invalid identity. assignedToFilter parameter

Hi, I recently updated my displayname in VSTS. Now using the approvals command doesn't work via slack (haven't tried other channels).

Error occurred: VS4029131: Invalid identity [old displayname] specified in assignedToFilter parameter. Make sure that the value is a valid identity ID or identity name and try again.

Also, have tried uninstalling and reinstalling the bot from slack, and trying to reconnect to vsts. No luck, trying to reconnect throws a different error. When i try to reconnect, i can see my vsts instance, but trying to connect throws Error occurred: Value cannot be null. Parameter name: value

SignIn button is not displaying

Hi guys,

After typing connect the bot should display the SignIn button to authorize the bot in Azure DevOps.

Unfortunately, it is not working for some reason in Skype Desktop 8.41.0.54 as well as on Skype Android version.

However, I do see "card" content as part of previewing the message within "DevOps VSTS bot " contact in RECENT CHAT list.

Here is how it looks for me:
image

Here is an example of dialog started from the scratch:

Skype Desktop view:

image

I tried using webchat and the button displayed correctly:

WebChat view (available on outlook.com mailbox)
image

Probably the issue relates to BotFramework itself.

However, would not it be better to provide some fallback approach to get the Authorize URL?

conversation based messages without option to choose

Just tried the vsts bot in my VSTS account. After some struggle, manage to connect to my VSTS account. The option based conversation is really good if we have few builds and releases. As we follow, micro services, we have many builds and releases. when I selected, builds, it come up with big list of builds. its hard to find the correct build to queue. is there any way or any future plan to request something simple like connect projectName, Queue BuildDefnName, release releaseDefnName / ?

Invalid URI: The hostname could not be parsed error when connecting VSTS-Bot in Slack

This is somewhat similar to the issue reported here: #93

I tried to connect the VSTS-Bot in Slack to VSTS and initially it seemed like it worked. Then I started getting errors to the "effect that my user account was not authorized to access this resource." I am the owner of the account, so this isn't a valid response as I do have permission to view Builds and Releases.

I tried the /deleteprofile option as suggested in the other issue, but now when I try to connect I get a series of errors as seen in the attached screenshot.

I've tried removing the bot from Slack, revoking permission in VSTS for the bot and starting over, but that doesn't seem to have helped at all.

Is there anything else I can try to get this connected and working?

vsts-bot-error

[Slack] Links are not formatted correctly

image

When someone comments on a task in VSTS with a link, it gets outputted on Slack incorrectly. What happens is you end up clicking the link, but then the link does not work because it is being copied twice for some reason causing you to go in and manually change the url to get the link to work.

Outputted by Bot link:

Link(Link)

https://themtmagency.visualstudio.com/MTM/_workitems/edit/7577(https://themtmagency.visualstudio.com/MTM/_workitems/edit/7577)

Actual Link:

https://themtmagency.visualstudio.com/MTM/_workitems/edit/7577

Im sure this can be resolved quite easily? It would definitely save a lot of time as we use the bot all the time!

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.