diff --git a/lib/dpl/providers/releases.rb b/lib/dpl/providers/releases.rb index 070bde069..ea389066c 100644 --- a/lib/dpl/providers/releases.rb +++ b/lib/dpl/providers/releases.rb @@ -37,6 +37,7 @@ class Releases < Provider local_tag: 'Current tag is: %{local_tag}', login: 'Authenticated as %s', insufficient_scopes: 'Dpl does not have permission to upload assets. Make sure your token has the repo or public_repo scope.', + insufficient_perm: 'Release resource not found. Make sure your token belongs to an account which has push permission to this repo.', overwrite_existing: 'File %s already exists, overwriting.', skip_existing: 'File %s already exists, skipping.', set_tag_name: 'Setting tag_name to %s', @@ -132,6 +133,8 @@ def release def create_release api.create_release(slug, local_tag, filter(opts).merge(draft: true)) + rescue Octokit::NotFound => nf + error :insufficient_perm end def local_tag