The comedian, Insecure regular and supervising producer will write, executive produce and star in her own TV series as part of her new pact with HBO.