Skip to content

Commit

Permalink
feat: update app to support merge queues (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezard authored Dec 29, 2024
1 parent 7d80cc7 commit d39e9fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion functions/src/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ describe('app', () => {
${'edited'}
${'reopened'}
${'synchronize'}
${'enqueued'}
`(
'should be triggered on pull_request.$action events',
async ({ action }: { action: 'opened' | 'edited' | 'reopened' | 'synchronize' }) => {
async ({ action }: { action: 'opened' | 'edited' | 'reopened' | 'synchronize' | 'enqueued' }) => {
const mock = nock('https://api.github.com')
.get('/repos/foo/.github/contents/.github%2Fsemantic.yml')
.reply(404)
Expand Down
1 change: 1 addition & 0 deletions functions/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export const app = (app: Probot) => {
app.on('pull_request.edited', handlePullRequestChange);
app.on('pull_request.reopened', handlePullRequestChange);
app.on('pull_request.synchronize', handlePullRequestChange);
app.on('pull_request.enqueued', handlePullRequestChange);
};
3 changes: 2 additions & 1 deletion functions/src/handle-pull-request-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export type ContextEvent =
| 'pull_request.opened'
| 'pull_request.reopened'
| 'pull_request.edited'
| 'pull_request.synchronize';
| 'pull_request.synchronize'
| 'pull_request.enqueued';
export type Status = {
sha: string;
state: 'error' | 'failure' | 'pending' | 'success';
Expand Down

0 comments on commit d39e9fb

Please sign in to comment.