{"id":14111219,"url":"https://github.com/ethomson/probot-azure-pipelines","last_synced_at":"2025-08-28T16:44:31.256Z","repository":{"id":57330775,"uuid":"147066916","full_name":"ethomson/probot-azure-pipelines","owner":"ethomson","description":"A GitHub app for Azure Pipelines, powered by Probot","archived":false,"fork":false,"pushed_at":"2019-01-04T22:00:38.000Z","size":178,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-27T08:02:26.291Z","etag":null,"topics":["ci-cd","probot","vsts"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethomson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-02T08:10:14.000Z","updated_at":"2019-11-13T18:01:33.000Z","dependencies_parsed_at":"2022-09-21T02:21:25.240Z","dependency_job_id":null,"html_url":"https://github.com/ethomson/probot-azure-pipelines","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fprobot-azure-pipelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fprobot-azure-pipelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fprobot-azure-pipelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fprobot-azure-pipelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethomson","download_url":"https://codeload.github.com/ethomson/probot-azure-pipelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867985,"owners_count":16555808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","probot","vsts"],"created_at":"2024-08-14T10:03:11.800Z","updated_at":"2024-10-09T22:03:31.613Z","avatar_url":"https://github.com/ethomson.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Probot for Azure Pipelines (probot-azure-pipelines)\n\n[![Build Status](https://dev.azure.com/ethomson/probot-azure-pipelines/_apis/build/status/ethomson.probot-azure-pipelines)](https://dev.azure.com/ethomson/probot-azure-pipelines/_build/latest?definitionId=39)\n\nA GitHub App for [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/)\nbuilt with [Probot](https://github.com/probot/probot).\n\nIf you have GitHub repositories that store your code, and Azure Pipelines\nbuild that perform continuous integration (CI) builds for validating pull\nrequests, then this app enables project contributors to requeue pull\nrequests builds just by typing `/rebuild` as a pull request comment.\n\n![Example of GitHub pull request discussion](https://user-images.githubusercontent.com/1130014/45150803-9c5f5580-b1c4-11e8-8d71-36b86fae0342.png)\n\nThis is useful if you have occasionally flaky tests or infrastructure,\nand it allows project contributors to requeue a build right from GitHub.\nThis lets you provide access to requeue a build without necessarily providing\npeople broader access to the build definition in Azure Pipelines.\n\nNote that `/rebuild` is limited to project contributors on GitHub (people\nlisted in the contributors group, or who are part of a team for this\nrepository).\n\n## Installation\n\nSince this application will need access to queue builds on your behalf\nin Azure Pipelines, you will need to set up your own instance of this\napplication.  There's no publicly available GitHub App instance that you\ncan just install.\n\n### Create a GitHub App\n\nYou'll need to [Create a new GitHub App](https://github.com/settings/apps/new)\nfor your installation.  Most of the settings are straightforward, but there\nare three important considerations:\n\n* **Webhook URL**: This is the URL of your deployed application.  If\n  you're deploying to Azure, for example, this will be\n  `my-azure-pipelines-build-app.azurewebsites.net`.\n* **Webhook secret**: Create a secret key of random data that will be used\n  to authenticate to your application.\n* **Private key**: Generate a new private key and save it to disk.\n\nMake sure that this application is **private** since it will have access\nto your Azure Pipelines account, and the ability to queue builds on your\nbehalf.\n\n### Create an Azure DevOps Personal Access Token\n\nA Personal Access Token (PAT) allows you to provide this app the ability\nto queue builds on your behalf.  In the Azure DevOps portal, select your\nsettings in the upper right and select Security.\n\nIn the Personal Access Token section, click \"Add\" to create a new PAT.\nGive it a description that is memorable, like \"probot-azure-pipelines\".\n\nIn \"Authorized Scopes\", change the option to selected scopes, then select\n\"Build (read and execute)\".  Limiting the scope of an access token is\nalways good security posture.\n\nFinally, save your new PAT in your password manager of choice.  You'll\nneed it again for deployment.\n\n### Deploying to Azure using Azure Pipelines\n\nIt's easy to deploy this to an Azure app service running node.js on Linux.\n(Make sure you're using node.js 8.9 or newer.)\n\n1. Fork this repository on GitHub.\n\n2. Set up a new Azure Pipelines build definition:\n\n   1. **Location**: GitHub\n   2. **Repository**: Select your fork of `probot-azure-pipelines`\n   3. **Template**: Use the suggested Node.js-based build\n   4. **Run**: Queue a build\n\n3. Set up a new Azure Pipelines release definition:\n\n   1. Create an **Azure App Service Deployment**\n   2. Add an artifact: select the **build artifact** produced by your\n      build pipeline\n   3. Select your stage, and select the stage tasks.  You'll be prompted\n      to enter your Azure subscription and app service name.  Change the\n      App type to \"Linux App\" and select your app service name.\n\n4. In the Azure portal, set up the configuration for your application.  In\n   application settings, set:\n\n   * **APP_ID**: the ID of your GitHub App\n   * **WEBHOOK_SECRET**: the secret key for your GitHub App\n   * **PRIVATE_KEY**: the private key file you downloaded when creating\n     your GitHub App.\n   \n      Note that the private key is in PEM format, so it spans multiple lines.\n      This environment variable needs to be on a **single line**.  Remove\n      the line breaks and replace them with a backslash (`\\`) followed by\n      an `n`.  Probot will find a literal `\\n` and replace it with newlines.\n      You can achieve this with Perl:\n\n      `perl -pe 's/\\n/\\\\n/' \u003c pemfile`\n\n   * **AZURE_DEVOPS_URL**: the URL of the Azure DevOps account that contains\n     the builds that are queued for your GitHub repository.\n   * **AZURE_DEVOPS_PAT**: your Personal Access Token\n\n### Deploy Manually\n\nIf you don't want to set up a Azure Pipelines build and release definition\ninto Azure, you can also build and run this application manually.\n\nTo download and build the latest release of this application:\n\n```\ngit clone --branch latest https://github.com/ethomson/probot-azure-pipelines\ncd probot-azure-pipelines\nnpm build\n```\n\nRefer to the [Probot Deployment\nGuide](https://probot.github.io/docs/deployment/) for setting up your\ndeployment.  This is a standard Probot app, but does require two custom\nenvironment variables:\n\n* **AZURE_DEVOPS_URL**: the URL of the Azure DevOps account that\n  contains the builds that are queued for your GitHub repository.\n* **AZURE_DEVOPS_PAT**: your Personal Access Token\n\n### Install for Your Repositories\n\nIn the GitHub settings page for your account (or the organization that you\ncreated the GitHub App in), navigate to the GitHub App settings.  Then just\nclick install on the app.  Authorize it for all your repositories, or each\nrepository individually.\n\nNow when you type `/rebuild` on a pull request, it should queue a rebuild.\n\n## License\n\nCopyright (c) Edward Thomson.  All rights reserved.  Available under the\nMIT license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fprobot-azure-pipelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethomson%2Fprobot-azure-pipelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fprobot-azure-pipelines/lists"}