{"action":"created","issue":{"url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88","labels_url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88/comments","events_url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88/events","html_url":"https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88","id":121291881,"number":88,"title":"Can not use any trigger other than BUTTON_TRIGGER when used a customized button for a repo","user":{"login":"s-afroz","id":16227888,"avatar_url":"https://avatars.githubusercontent.com/u/16227888?v=3","gravatar_id":"","url":"https://api.github.com/users/s-afroz","html_url":"https://github.com/s-afroz","followers_url":"https://api.github.com/users/s-afroz/followers","following_url":"https://api.github.com/users/s-afroz/following{/other_user}","gists_url":"https://api.github.com/users/s-afroz/gists{/gist_id}","starred_url":"https://api.github.com/users/s-afroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-afroz/subscriptions","organizations_url":"https://api.github.com/users/s-afroz/orgs","repos_url":"https://api.github.com/users/s-afroz/repos","events_url":"https://api.github.com/users/s-afroz/events{/privacy}","received_events_url":"https://api.github.com/users/s-afroz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-09T16:59:11Z","updated_at":"2015-12-10T07:09:51Z","closed_at":null,"body":"I would like to perform different actions for different repos. For example, I want to display trigger builds for some repos while do a build-and-deploy for some other repos. In each case, these actions will be performed as soon as the pull request is open/re-open/re-scoped or the specific trigger button is clicked from within the pull request by an admin. We launch a Jenkins job with specific parameters for each repo.\r\n\r\nIn order to achieve this, I need to \r\n(1) Display \"Trigger Build\" for some repos and \"Build and Deploy\" for some other repos. It was possible by following the helpful suggestions from Thomas as below.\r\n        1. Add the button and name it \"Build and Deploy\"\r\n        2. Add a trigger\r\n        3. filter text: ${PULL_REQUEST_FROM_REPO_NAME}-${BUTTON_TRIGGER_TITLE}\r\n        4. filter regexp: name of repo, like \"rep_1-Build and Deploy\"\r\n        5. Configure the URL and anything else you want to occur when button is pressed.\r\n(2) Enable multiple trigger check boxes in the same trigger configuration.\r\n      OPEN, RE-OPEN, BUTTON-TRIGGER\r\n\r\nItem (2) is not possible at the moment along with item (1). Meaning, if I use the filters as described and enable OPEN, RE-OPEN, and BUTTON_TRIGGER check boxes, opening or re-opening a pull request for that repo does not trigger the job. Only clicking on the button from the pull request triggers the job. To get around this issue, I have to create 2 triggers for each repo, one with the button title in the filter and the other without it.\r\n\r\nWould be nice if we could use one trigger to achieve both."},"comment":{"url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/comments/163520223","html_url":"https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88#issuecomment-163520223","issue_url":"https://api.github.com/repos/tomasbjerre/pull-request-notifier-for-bitbucket/issues/88","id":163520223,"user":{"login":"tomasbjerre","id":439571,"avatar_url":"https://avatars.githubusercontent.com/u/439571?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasbjerre","html_url":"https://github.com/tomasbjerre","followers_url":"https://api.github.com/users/tomasbjerre/followers","following_url":"https://api.github.com/users/tomasbjerre/following{/other_user}","gists_url":"https://api.github.com/users/tomasbjerre/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasbjerre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasbjerre/subscriptions","organizations_url":"https://api.github.com/users/tomasbjerre/orgs","repos_url":"https://api.github.com/users/tomasbjerre/repos","events_url":"https://api.github.com/users/tomasbjerre/events{/privacy}","received_events_url":"https://api.github.com/users/tomasbjerre/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T07:09:51Z","updated_at":"2015-12-10T07:09:51Z","body":"Perhaps this filter regexp will work for you?\r\n\r\n`rep_1-(Build and Deploy)?$`\r\n\r\nhttps://jex.im/regulex/#!embed=false&flags=&re=rep_1-(Build%20and%20Deploy)%3F%24\r\n\r\nThe ${BUTTON_TRIGGER_TITLE} will evaluate to empty if its not a button trigger event. So this regexp will match rep_1- when open/re-open/re-scoped and rep_1-Build and Deploy when button pressed."}}