{"action":"created","issue":{"url":"https://api.github.com/repos/kswedberg/grunt-version/issues/21","repository_url":"https://api.github.com/repos/kswedberg/grunt-version","labels_url":"https://api.github.com/repos/kswedberg/grunt-version/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/kswedberg/grunt-version/issues/21/comments","events_url":"https://api.github.com/repos/kswedberg/grunt-version/issues/21/events","html_url":"https://github.com/kswedberg/grunt-version/issues/21","id":160337963,"number":21,"title":"Updating only first version found in file (composer.json issue)","user":{"login":"pkollitsch","id":83281,"avatar_url":"https://avatars.githubusercontent.com/u/83281?v=3","gravatar_id":"","url":"https://api.github.com/users/pkollitsch","html_url":"https://github.com/pkollitsch","followers_url":"https://api.github.com/users/pkollitsch/followers","following_url":"https://api.github.com/users/pkollitsch/following{/other_user}","gists_url":"https://api.github.com/users/pkollitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/pkollitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkollitsch/subscriptions","organizations_url":"https://api.github.com/users/pkollitsch/orgs","repos_url":"https://api.github.com/users/pkollitsch/repos","events_url":"https://api.github.com/users/pkollitsch/events{/privacy}","received_events_url":"https://api.github.com/users/pkollitsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-15T04:52:52Z","updated_at":"2016-06-27T12:35:21Z","closed_at":null,"body":"In composer.json files we sometimes have multiple items with versions. The task updates all versions to the new one.\r\n\r\ngrunt task:\r\n<pre>project: {\r\n  options: {\r\n    release: 'patch'\r\n  },\r\n  src: ['package.json', 'bower.json', 'composer.json']\r\n},</pre>\r\n\r\ncomposer file (sample)\r\n<pre>{\r\n  \"version\": \"5.0.10\",\r\n  ... etc ...\r\n  \"repositories\":[\r\n  {\r\n    \"type\"   : \"package\",\r\n    \"package\": {\r\n      \"name\"   : \"wordpress\",\r\n      \"type\"   : \"webroot\",\r\n      **\"version\": \"4\",**\r\n      ... etc ...\r\n    }\r\n  },\r\n],\r\n</pre>\r\n\r\nthe version number inside of the repositories path should not be updated.\r\n\r\nit there any way to update only the first occurrence of version or a way to somehow regexp to only a version tag in the root level of the json?"},"comment":{"url":"https://api.github.com/repos/kswedberg/grunt-version/issues/comments/228732976","html_url":"https://github.com/kswedberg/grunt-version/issues/21#issuecomment-228732976","issue_url":"https://api.github.com/repos/kswedberg/grunt-version/issues/21","id":228732976,"user":{"login":"kswedberg","id":3485,"avatar_url":"https://avatars.githubusercontent.com/u/3485?v=3","gravatar_id":"","url":"https://api.github.com/users/kswedberg","html_url":"https://github.com/kswedberg","followers_url":"https://api.github.com/users/kswedberg/followers","following_url":"https://api.github.com/users/kswedberg/following{/other_user}","gists_url":"https://api.github.com/users/kswedberg/gists{/gist_id}","starred_url":"https://api.github.com/users/kswedberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kswedberg/subscriptions","organizations_url":"https://api.github.com/users/kswedberg/orgs","repos_url":"https://api.github.com/users/kswedberg/repos","events_url":"https://api.github.com/users/kswedberg/events{/privacy}","received_events_url":"https://api.github.com/users/kswedberg/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T12:35:21Z","updated_at":"2016-06-27T12:35:21Z","body":"Sorry for the delay in getting back to you! You should be able to set the `flags` option to an empty string. The default is `'g'` (global)."}}
{"actor":{"display_login":"kswedberg"}}