// Post a pull request comment with the expected diff.
Post a pull request comment with the expected diff.
// Post a pull request comment with the expected diff .
func pr(diff string) {
	if githubToken == "" {
		log.Printf("In order to add request comment, set the GITHUB_TOKEN input.")
		return
	}
	body := "[goreadme](https://github.com/posener/goreadme) will not make any changes in this PR"
	if diff != "" {
		body = fmt.Sprintf(
			"[goreadme](https://github.com/posener/goreadme) diff for %s file for this PR:\n\n%s",
			path,
			diff)
	}
	ctx := context.Background()
	err := actionutil.PRComment(ctx, githubToken, body)
	if err != nil {
		log.Fatal(err)
	}
}
func pr ( diff string ) { if githubToken == " " { log . Printf ( " " ) return } body := " " if diff != " " { body = fmt . Sprintf ( " \n \n " , path , diff ) } ctx := context . Background ( ) err := actionutil . PRComment ( ctx , githubToken , body ) if err != nil { log . Fatal ( err ) } }
Post a pull request comment with the expected diff.
Post a pull request comment with the expected diff .