We direct users to the installation configuration page on GitHub's UI when they want to add more repositories and so on. However, I discovered yesterday that non-admin users of an organization are led to a 404 page. I found a more generic URL that works for everyone. GitHub has decided to redirect users to the appropriate page. Since we don't have separate branches for different installation types, I've moved it to the serializer as it's only used once.
14 lines
379 B
Ruby
14 lines
379 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Serializers::GithubInstallation < Serializers::Base
|
|
def self.serialize_internal(ins, options = {})
|
|
{
|
|
id: ins.id,
|
|
name: ins.name,
|
|
type: ins.type,
|
|
installation_id: ins.installation_id,
|
|
installation_url: "https://github.com/apps/#{Config.github_app_name}/installations/#{ins.installation_id}"
|
|
}
|
|
end
|
|
end
|