Skip to content

Commit 281808d

Browse files
jankeromnesroboquat
authored andcommitted
[server] Update lastWebhookReceived also on Bitbucket Server prebuilds
1 parent 59ae4bb commit 281808d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/server/ee/src/prebuilds/bitbucket-server-app.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ export class BitbucketServerApp {
102102
const cloneUrl = context.repository.cloneUrl;
103103
const commit = context.revision;
104104
const projectAndOwner = await this.findProjectAndOwner(cloneUrl, user);
105+
if (projectAndOwner.project) {
106+
/* tslint:disable-next-line */
107+
/** no await */ this.projectDB.updateProjectUsage(projectAndOwner.project.id, {
108+
lastWebhookReceived: new Date().toISOString(),
109+
});
110+
}
105111
const config = await this.prebuildManager.fetchConfig({ span }, user, context);
106112
if (!this.prebuildManager.shouldPrebuild(config)) {
107113
console.log("Bitbucket push event: No config. No prebuild.");

0 commit comments

Comments
 (0)