Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move issue to in review once review_requested #156

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading