There is a little more than riveting on a metal patch. Manufactures produce something called the Structural Repair Manual (SRM) for each aircraft model. Airline engineers and sheet metal mechanics will use this manual and determine if there is an existing repair in the SRM that can be used to accomplish the repair. If there is they will follow the SRM and accomplish the repair. Repair made in accordance with the SRM are considered FAA approved because the SRM is an FAA approved document.
However, should the damage be outside what the SRM allows then the airline engineering staff or the manufactures engineering staff to will have to design a repair specifically for the damage. These repairs, that are outside what is allowed by the SRM also require FAA approval. After the FAA has reviewed the repair proposal they will issue something call a 8110-3 which certifies that the repair is air worthy.