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

New Provider: Azure DevOps #187

Closed
wants to merge 4 commits into from
Closed

New Provider: Azure DevOps #187

wants to merge 4 commits into from

Conversation

wh1337
Copy link
Contributor

@wh1337 wh1337 commented Nov 30, 2021

Look in Discord:

image

@dscalzi
Copy link
Collaborator

dscalzi commented Nov 30, 2021

are we only intending to support the push event? Azure devops (afaik) is a full git service.

@wh1337
Copy link
Contributor Author

wh1337 commented Nov 30, 2021

Ah, for some reason Azure calls them service hooks, versus webhooks so I missed the service hooks entirely.

https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops

I'll get those updated and added to the PR. Sorry about that.

@wh1337 wh1337 marked this pull request as draft November 30, 2021 15:33
@dscalzi
Copy link
Collaborator

dscalzi commented Nov 30, 2021

Take your time, make sure it's tested.

@wh1t3lord
Copy link

wh1t3lord commented Dec 31, 2021

Can you add this wrapper for Azure pipelines? Seems all is fine. I mean add for the site.

@RudeySH
Copy link

RudeySH commented Jun 18, 2022

What's the status of this PR? Will it work for push events if merged?


public async gitPush(): Promise<void> {
this.logger.debug('Parsing git push event')
this.embed.title = this.body.message.markdown
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use markdown in the title of an embed. You should use this.body.message.text instead.

@RudeySH
Copy link

RudeySH commented Aug 9, 2022

Currently, the provider puts markdown in the title of the embed, which has the following ugly result:

image

When you change this.body.message.markdown to this.body.message.text, it will have the following result:

image

Still not perfect though, but this is because DevOps puts a link in parentheses in the text variant of the message. Here's the raw JSON that comes from Azure DevOps:

  "message": {
    "text": "RudeySH pushed updates to SteamHunters:main\r\n(https://dev.azure.com/steamhunters/Steam%20Hunters/_git/SteamHunters/#version=GBmain)",
    "html": "RudeySH pushed updates to <a href=\"https://dev.azure.com/steamhunters/Steam%20Hunters/_git/SteamHunters/\">SteamHunters</a>:<a href=\"https://dev.azure.com/steamhunters/Steam%20Hunters/_git/SteamHunters/#version=GBmain\">main</a>",
    "markdown": "RudeySH pushed updates to [SteamHunters](https://dev.azure.com/steamhunters/Steam%20Hunters/_git/SteamHunters/):[main](https://dev.azure.com/steamhunters/Steam%20Hunters/_git/SteamHunters/#version=GBmain)"
  },

Maybe we should remove this link from the message using regex?


On a sidenote, is it intended that git tag events are also picked up?

image

@wh1337 wh1337 closed this Nov 24, 2022
@wh1337 wh1337 deleted the azure-devops branch November 24, 2022 04:32
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

Successfully merging this pull request may close these issues.

Azure DevOps support
4 participants