@@ -38,6 +38,11 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
3838 throw new Error ( "Changelog generation job not found" ) ;
3939 }
4040
41+ const basicAuth = btoa ( `${ this . env . GITHUB_CLIENT_ID } :${ this . env . GITHUB_CLIENT_SECRET } ` ) ;
42+ const AuthenticatedOctokit = Octokit . defaults ( {
43+ request : { headers : { authorization : `Basic ${ basicAuth } ` } } ,
44+ } ) ;
45+
4146 const owner = job . repoOwner ;
4247 const repo = job . repoName ;
4348 const since = job . rangeStart ?? undefined ;
@@ -57,12 +62,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
5762 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
5863 async ( ) => {
5964 const db = createDb ( this . env ) ;
60- const octokit = new Octokit ( ) ;
65+ const octokit = new AuthenticatedOctokit ( ) ;
6166 const report = createReportStatusFn ( {
6267 db,
6368 jobId,
6469 status : "Syncing repositories" ,
6570 statusOnError : "Failed to sync repositories" ,
71+ canSkip : true ,
6672 } ) ;
6773 await report ( ( ) => fetchAndSyncRepositories ( { octokit, db, owner } ) ) ;
6874 } ,
@@ -73,13 +79,14 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
7379 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
7480 async ( ) => {
7581 const db = createDb ( this . env ) ;
76- const octokit = new Octokit ( ) ;
82+ const octokit = new AuthenticatedOctokit ( ) ;
7783
7884 const report = createReportStatusFn ( {
7985 db,
8086 jobId,
8187 status : "Syncing contributors" ,
8288 statusOnError : "Failed to sync contributors" ,
89+ canSkip : true ,
8390 } ) ;
8491 await report ( ( ) => fetchAndSyncContributors ( { octokit, db, owner, repo } ) ) ;
8592 } ,
@@ -90,12 +97,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
9097 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
9198 async ( ) => {
9299 const db = createDb ( this . env ) ;
93- const octokit = new Octokit ( ) ;
100+ const octokit = new AuthenticatedOctokit ( ) ;
94101 const report = createReportStatusFn ( {
95102 db,
96103 jobId,
97104 status : "Syncing commits" ,
98105 statusOnError : "Failed to sync commits" ,
106+ canSkip : true ,
99107 } ) ;
100108 await report ( ( ) =>
101109 fetchAndSyncCommits ( { octokit, db, owner, repo, since, until, headSha } ) ,
@@ -108,12 +116,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
108116 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
109117 async ( ) => {
110118 const db = createDb ( this . env ) ;
111- const octokit = new Octokit ( ) ;
119+ const octokit = new AuthenticatedOctokit ( ) ;
112120 const report = createReportStatusFn ( {
113121 db,
114122 jobId,
115123 status : "Syncing tags" ,
116124 statusOnError : "Failed to sync tags" ,
125+ canSkip : true ,
117126 } ) ;
118127 await report ( ( ) => fetchAndSyncTags ( { octokit, db, owner, repo } ) ) ;
119128 } ,
@@ -124,12 +133,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
124133 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
125134 async ( ) => {
126135 const db = createDb ( this . env ) ;
127- const octokit = new Octokit ( ) ;
136+ const octokit = new AuthenticatedOctokit ( ) ;
128137 const report = createReportStatusFn ( {
129138 db,
130139 jobId,
131140 status : "Syncing releases" ,
132141 statusOnError : "Failed to sync releases" ,
142+ canSkip : true ,
133143 } ) ;
134144 await report ( ( ) => fetchAndSyncReleases ( { octokit, db, owner, repo } ) ) ;
135145 } ,
@@ -140,12 +150,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
140150 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
141151 async ( ) => {
142152 const db = createDb ( this . env ) ;
143- const octokit = new Octokit ( ) ;
153+ const octokit = new AuthenticatedOctokit ( ) ;
144154 const report = createReportStatusFn ( {
145155 db,
146156 jobId,
147157 status : "Syncing pull requests" ,
148158 statusOnError : "Failed to sync pull requests" ,
159+ canSkip : true ,
149160 } ) ;
150161 await report ( ( ) => fetchAndSyncPullRequests ( { octokit, db, owner, repo, since } ) ) ;
151162 } ,
@@ -156,12 +167,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
156167 { retries : { limit : 3 , delay : 30 , backoff : "exponential" } , timeout : 30000 } ,
157168 async ( ) => {
158169 const db = createDb ( this . env ) ;
159- const octokit = new Octokit ( ) ;
170+ const octokit = new AuthenticatedOctokit ( ) ;
160171 const report = createReportStatusFn ( {
161172 db,
162173 jobId,
163174 status : "Syncing issues" ,
164175 statusOnError : "Failed to sync issues" ,
176+ canSkip : true ,
165177 } ) ;
166178 await report ( ( ) => fetchAndSyncIssues ( { octokit, db, owner, repo, since } ) ) ;
167179 } ,
@@ -177,6 +189,7 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
177189 jobId,
178190 status : "Linking PRs and issues" ,
179191 statusOnError : "Failed to link PRs and issues" ,
192+ canSkip : true ,
180193 } ) ;
181194 await report ( ( ) => linkPrsAndIssues ( { db, owner, repo } ) ) ;
182195 } ,
@@ -188,12 +201,13 @@ export class ChangelogGenerationJobWorkflow extends WorkflowEntrypoint<
188201 async ( ) => {
189202 const db = createDb ( this . env ) ;
190203 const openRouterProvider = createOpenRouter ( { apiKey : this . env . OPENROUTER_API_KEY } ) ;
191- const octokit = new Octokit ( ) ;
204+ const octokit = new AuthenticatedOctokit ( ) ;
192205 const report = createReportStatusFn ( {
193206 db,
194207 jobId,
195208 status : "Generating changelog" ,
196209 statusOnError : "Failed to generate changelog" ,
210+ canSkip : false ,
197211 } ) ;
198212 await report ( async ( ) => {
199213 const changelogContent = await generateChangelogContent ( {
0 commit comments