Skip to content

Commit

Permalink
Draft PRs fix for PR Board automation (#3649)
Browse files Browse the repository at this point in the history
* - modified files to use slackapi for github workglow

* - added original for the step

* - removed curl and applied slackapi

* Update Slack notification ID in PR ping workflow

* Refactor GitHub Action payloads

* Update .github/workflows/discussion_ping.yml

* Update .github/workflows/pr_limit_reminders.yml

* Update .github/workflows/pr_ping.yml

* Remove trailing spaces to pass lint check

* fixed the vatiables discussion_ping.yml

* added variables and fixed the slack action api version for discussion_ping.yml

* added variables and fixed the slack action api version for pr_ping.yml

* added variables and fixed the slack action api version for pr_limit_reminder.yml

* Update discussion ping message variables

* Update Slack message format in PR limit reminders and PR ping workflows

* Fix multiplication syntax in Slack message

* Fix formatting in discussion_ping.yml

* Update discussion_ping.yml to include additional notification message

* Fixing linting issue

* Update discussion ping message format

* Update variable names in GitHub workflow files

* Update variable names in GitHub workflows

* Fixed the variable Names added env. as Prefix

* added additonal check for ready for review block

* removed trailing spaces

* Fix formatting in prs.mjs

* - removed trailing space

* Fix formatting in prs.mjs

* - fixed the prettier issue

* Fix PR card movement for draft pull requests

---------

Co-authored-by: Olga Bulat <obulat@gmail.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
  • Loading branch information
3 people authored Jan 17, 2024
1 parent 8df2e0c commit f8b1170
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion automations/js/src/project_automation/prs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ export const main = async (octokit, core) => {
core.debug(`PR card ID: ${prCard.id}`)

if (eventName === 'pull_request_review') {
await syncReviews(core, pr, prBoard, prCard)
if (pr.isDraft) {
await prBoard.moveCard(prCard.id, prBoard.columns.Draft)
} else {
await syncReviews(core, pr, prBoard, prCard)
}
} else {
switch (eventAction) {
case 'opened':
Expand Down

0 comments on commit f8b1170

Please sign in to comment.