{"id":17996559,"url":"https://github.com/maxbeatty/hubot-sprintly-deploy-pull-request","last_synced_at":"2025-04-04T06:14:04.082Z","repository":{"id":14796054,"uuid":"17518166","full_name":"maxbeatty/hubot-sprintly-deploy-pull-request","owner":"maxbeatty","description":"Search Pull Request descriptions to mark items as deployed in Sprint.ly","archived":false,"fork":false,"pushed_at":"2014-03-07T19:45:00.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T00:07:54.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/maxbeatty.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":"2014-03-07T15:24:32.000Z","updated_at":"2014-03-07T19:45:00.000Z","dependencies_parsed_at":"2022-09-09T00:41:50.049Z","dependency_job_id":null,"html_url":"https://github.com/maxbeatty/hubot-sprintly-deploy-pull-request","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbeatty%2Fhubot-sprintly-deploy-pull-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbeatty%2Fhubot-sprintly-deploy-pull-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbeatty%2Fhubot-sprintly-deploy-pull-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbeatty%2Fhubot-sprintly-deploy-pull-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxbeatty","download_url":"https://codeload.github.com/maxbeatty/hubot-sprintly-deploy-pull-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128753,"owners_count":20888235,"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":[],"created_at":"2024-10-29T21:14:59.420Z","updated_at":"2025-04-04T06:14:04.063Z","avatar_url":"https://github.com/maxbeatty.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Hubot Sprint.ly Deploy Pull Request\n==================================\n\nSearch Pull Request descriptions to mark items as deployed in Sprint.ly\n\n## Installation\n\n1. In your hubot repo, `npm install hubot-sprintly-deploy-pull-request --save`\n2. Add `hubot-sprintly-deploy-pull-request` to your `external-scripts.json`\n\nYou'll also need to set these environment variables:\n\n- `HUBOT_GITHUB_TOKEN`: GitHub authentication token\n- `HUBOT_GITHUB_USER`: (optional) GitHub user/organization to identify owner of repository\n- `HUBOT_SPRINTLY_TOKEN`: (optional) Sprint.ly authentication token \u003cemail:api_key\u003e\n- `HUBOT_SPRINTLY_PRODUCT_ID`: (optional) Sprint.ly product id\n\nIf you don't have a GitHub token yet, run this:\n\n```bash\ncurl -i https://api.github.com/authorizations -d '{\"scopes\":[\"repo\"]}' -u \"yourusername\"\n```\n\n## Usage\n\nIn your deploy script, make a request to `http://your-hubot-host/hubot/sprintly-deploy-pull-request` with the following parameters:\n\n- `numbers`: (_required_) comma-separated list of Pull Request / Issue numbers\n- `repo`: (_required_) repository to find those numbers\n- `owner`: owner of the repository (defaults to `process.env.HUBOT_GITHUB_USER`)\n- `productId`: numeric id of Sprint.ly product (defaults to `process.env.HUBOT_SPRINTLY_PRODUCT_ID`)\n- `auth`: Sprint.ly authentication token \u003cemail:api_key\u003e (defaults to `process.env.HUBOT_SPRINTLY_TOKEN`)\n- `env`: environment to which you just deployed to be used in Sprint.ly (defaults to 'production')\n\nWhat you might add to your deploy script:\n\n```bash\n# repository name\nprojectName=yourproject\n\nfunction sprintlyDeploy {\n  # get last two git tags for git log. returns something like release123..release124\n  tagDiff=`git tag -l \"release-*\" | sort --version-sort  | tail -n 2 | xargs echo | sed 's/ /../'`\n  # get issue numbers from git log\n  numbers=`git log --pretty=format:%s $tagDiff | egrep -o '#[0-9]+' | sed 's/#//g'`\n  curl -X POST -d \"numbers=$numbers\u0026repo=$projectName\u0026environment=$1\" http://your-hubot-host/hubot/sprintly-deploy-pull-request\n}\n\n# you can use this function in other scripts that deploy to different environments\nsprintlyDeploy production\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbeatty%2Fhubot-sprintly-deploy-pull-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxbeatty%2Fhubot-sprintly-deploy-pull-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbeatty%2Fhubot-sprintly-deploy-pull-request/lists"}