class Gems::TrustedPublisher
A trusted publisher of a gem, which may push it without an API key of its own
The endpoints wrap the publisher in the record that ties it to the gem, so the readers of the publisher itself, such as {#repository_owner}, read the object nested under it, and {#publisher} is that object as it was sent.
@api public
Constants
- GITHUB_ACTION
-
The type of a trusted publisher that is a GitHub Actions workflow, the only type the RubyGems
APIdefines{API::TrustedPublisherEndpoints#add_trusted_publisher} sends this type unless it is given another, so that a type the
APIadds can be configured before this library knows about it.@api public
Public Instance Methods
The attributes of the publisher itself, as the endpoint sent them
The readers of this class read the fields of a GitHub Actions workflow, which is the only type the RubyGems API defines; this is the object they read, for a type that has fields of its own.
@api public @return [Hash{String => Object}] the attributes of the publisher, empty when the record carries none @example Read a field of a publisher type this library has no reader for
trusted_publisher.publisher["repository_owner"]
# File lib/gems/trusted_publisher.rb, line 138 def publisher self["trusted_publisher"] || {} end