Closed shirmoran closed 1 month ago
This is a way to solve it, but it doesn't look like a good approach to me, as the setters/getters use an internal global/package var. I would probably change the
CreateSheetsAndDriveServices
to add an extra string argument for that credentails path.
I agree - That's a better idea. I'll do the change, thanks!
This PR adds
credentials
as an argument ofCreateSheetsAndDriveServices
func in order to allow the use of it independently from usingupload results-spreadsheet
sub-command. In current state, the credentials are sent using a flag to the mentioned sub command, which limits functions using this variable to run using the sub-command only. In theoperator-results-spreadsheet
repo, we would like to allow the use ofCreateSheetsAndDriveServices
func (which uses thecredentials
variable) in order to add more columns to an existing sheet, and for that we need the credentials to be set manually.