blob: 459a3a6472684ae349307af7295e37e95f255a75 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "template_func_proto.h"
int get_github_release_notes_tplfunc_entrypoint(void *frame, void *ptr) {
int result;
char **output = (char **) ptr;
struct tplfunc_frame *f = (struct tplfunc_frame *) frame;
char *api_token = getenv("STASIS_GITHUB_TOKEN");
if (!api_token) {
api_token = getenv("GITHUB_TOKEN");
}
result = get_github_release_notes(api_token ? api_token : "anonymous",
(const char *) f->argv[0].t_char_ptr,
(const char *) f->argv[1].t_char_ptr,
(const char *) f->argv[2].t_char_ptr,
output);
return result;
}
|