Skip to content

Commit

Permalink
feat: move issue to in review once review_requested
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jul 13, 2023
1 parent 25c71ea commit 6c322e9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/app/lib/apps/automatic-dev-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,22 @@ module.exports = function(webhookEvents, githubIssues, columns) {
]);
});

webhookEvents.on('pull_request.ready_for_review', async (context) => {
webhookEvents.on([
'pull_request.ready_for_review',
'pull_request.review_requested'
], async (context) => {

const {
pull_request
pull_request,
action
} = context.payload;

// do not forcefully move draft PRs into review,
// these shall be marked as _ready for review_ first
if (action === 'review_requested' && pull_request.draft) {
return;
}

const state = isExternal(pull_request) ? EXTERNAL_CONTRIBUTION : IN_REVIEW;

const column = columns.getByState(state);
Expand Down

0 comments on commit 6c322e9

Please sign in to comment.