@@ -100,27 +100,27 @@ func getSecretValue(secretName string) (string, error) {
100100
101101// addRepoSecret will add a secret to a GitHub repo for use in GitHub Codespaces.
102102//
103- // The secretName and secretValue will determine the name of the secret added and it's corresponding value.
103+ // The secretName and secretValue determine the name of the secret added and its corresponding value.
104104//
105- // The actual transmission of the secret value to GitHub using the api requires that the secret value is encrypted
105+ // The actual transmission of the secret value to GitHub using the API requires that the secret value is encrypted
106106// using the public key of the target repo. This encryption is done using x/crypto/nacl/box.
107107//
108108// First, the public key of the repo is retrieved. The public key comes base64
109109// encoded, so it must be decoded prior to use.
110110//
111- // Second, the decode key is converted into a fixed size byte array.
111+ // Second, the decoded key is converted into a fixed- size byte array.
112112//
113113// Third, the secret value is converted into a slice of bytes.
114114//
115115// Fourth, the secret is encrypted with box.SealAnonymous using the repo's decoded public key.
116116//
117- // Fifth, the encrypted secret is encoded as a base64 string to be used in a github.EncodedSecret type.
117+ // Fifth, the encrypted secret is encoded as a base64 string to be used in a github.EncryptedSecret type.
118118//
119- // Sixth, The other two properties of the github.EncodedSecret type are determined. The name of the secret to be added
119+ // Sixth, the other two properties of the github.EncryptedSecret type are determined: the name of the secret to be added
120120// (string not base64), and the KeyID of the public key used to encrypt the secret.
121121// This can be retrieved via the public key's GetKeyID method.
122122//
123- // Finally, the github.EncodedSecret is passed into the GitHub client.Codespaces.CreateOrUpdateRepoSecret method to
123+ // Finally, the github.EncryptedSecret is passed into the GitHub client.Codespaces.CreateOrUpdateRepoSecret method to
124124// populate the secret in the GitHub repo.
125125func addRepoSecret (ctx context.Context , client * github.Client , owner , repo , secretName , secretValue string ) error {
126126 publicKey , _ , err := client .Codespaces .GetRepoPublicKey (ctx , owner , repo )
0 commit comments