{"action":"created","issue":{"url":"https://api.github.com/repos/concourse/git-resource/issues/223","repository_url":"https://api.github.com/repos/concourse/git-resource","labels_url":"https://api.github.com/repos/concourse/git-resource/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/concourse/git-resource/issues/223/comments","events_url":"https://api.github.com/repos/concourse/git-resource/issues/223/events","html_url":"https://github.com/concourse/git-resource/pull/223","id":374401402,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MTEyMjM2","number":223,"title":"[check] Allow triggering with tag updates","user":{"login":"talset","id":1426698,"node_id":"MDQ6VXNlcjE0MjY2OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1426698?v=4","gravatar_id":"","url":"https://api.github.com/users/talset","html_url":"https://github.com/talset","followers_url":"https://api.github.com/users/talset/followers","following_url":"https://api.github.com/users/talset/following{/other_user}","gists_url":"https://api.github.com/users/talset/gists{/gist_id}","starred_url":"https://api.github.com/users/talset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talset/subscriptions","organizations_url":"https://api.github.com/users/talset/orgs","repos_url":"https://api.github.com/users/talset/repos","events_url":"https://api.github.com/users/talset/events{/privacy}","received_events_url":"https://api.github.com/users/talset/received_events","type":"User","site_admin":false},"labels":[{"id":765827530,"node_id":"MDU6TGFiZWw3NjU4Mjc1MzA=","url":"https://api.github.com/repos/concourse/git-resource/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-26T14:10:03Z","updated_at":"2018-12-22T16:49:46Z","closed_at":"2018-12-11T18:57:14Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/concourse/git-resource/pulls/223","html_url":"https://github.com/concourse/git-resource/pull/223","diff_url":"https://github.com/concourse/git-resource/pull/223.diff","patch_url":"https://github.com/concourse/git-resource/pull/223.patch"},"body":"From a customer usecase, they use git tag like the docker way by updating static tag on new release:\r\n\r\ngit tag can be updating by changing the commit associeted\r\n\r\n```\r\ngit tag DEV\r\ngit push origin DEV\r\n\r\n# make changes\r\ngit commit\r\n\r\ngit tag DEV --force\r\ngit push origin DEV --force\r\n```\r\n\r\nCurrent git resource is only watch tags name but not tags update. So pipelines aren't triggered when the tag is updated and if the tag if from a different branch from the specified (or master) the resource fail with `error: pathspec 'DEV' did not match any file(s) known to git.`\r\nTo solve it I suggest to not use only ref but ref and commit when tag_filter is used.\r\n\r\nThis commit allow to store the tag name and commit id associeted to the tag as \"version\" of the resource. With thos way we are able to re-trigger the pipeline when a the tags is updated.\r\n\r\nHere is an example or resource output with tag_filters:\r\n```\r\n  [\r\n    {\r\n      \"ref\": \"2.0-staging\",\r\n      \"commit\": \"73128e2cf79e5547c1ef292bc34de3b84f590b8d\"\r\n    },\r\n    {\r\n      \"ref\": \"3.0-staging\",\r\n      \"commit\": \"51af5f19c36833064c6d51d88af7495c8dcfa512\"\r\n    }\r\n  ]\r\n```\r\n\r\nresource versions can be enabled or disabled as well\r\n\r\n![tmp zflxpjcth5_screenshot](https://user-images.githubusercontent.com/1426698/47571650-5bb8c880-d939-11e8-91dc-3a414e3b89dc.png)\r\n\r\nLet me know if something need to be changed"},"comment":{"url":"https://api.github.com/repos/concourse/git-resource/issues/comments/449583238","html_url":"https://github.com/concourse/git-resource/pull/223#issuecomment-449583238","issue_url":"https://api.github.com/repos/concourse/git-resource/issues/223","id":449583238,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTU4MzIzOA==","user":{"login":"vito","id":1880,"node_id":"MDQ6VXNlcjE4ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/1880?v=4","gravatar_id":"","url":"https://api.github.com/users/vito","html_url":"https://github.com/vito","followers_url":"https://api.github.com/users/vito/followers","following_url":"https://api.github.com/users/vito/following{/other_user}","gists_url":"https://api.github.com/users/vito/gists{/gist_id}","starred_url":"https://api.github.com/users/vito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vito/subscriptions","organizations_url":"https://api.github.com/users/vito/orgs","repos_url":"https://api.github.com/users/vito/repos","events_url":"https://api.github.com/users/vito/events{/privacy}","received_events_url":"https://api.github.com/users/vito/received_events","type":"User","site_admin":false},"created_at":"2018-12-22T16:49:46Z","updated_at":"2018-12-22T16:49:46Z","author_association":"MEMBER","body":"@michaelklishin @talset Just published 1.1, sorry for the delay! It's available on Docker Hub as `concourse/git-resource:1.1` (and latest/1/1.1.0). "}}
{"actor":{"display_login":"vito"}}