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

Contributor project automations via workflows #2584

Merged
Merged
8 changes: 3 additions & 5 deletions .github/workflows/move-ready-for-review-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
move-pr-to-initial-review:
if: github.event.comment.body == '/pr mark ready' && github.event.issue.pull_request
if: contains(github.event.comment.body, '/pr mark ready') && github.event.issue.pull_request
runs-on: ubuntu-latest
steps:
- name: Move To Initial Review
Expand All @@ -23,9 +23,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
})
const code_reviews = projects.data.find(project => {
return project.name === 'Code Reviews';
})
const code_reviews = projects.data.find(project => project.name === 'Code Reviews');
if (!code_reviews) {
console.error("'Code Reviews' project not found!")
return
sam20908 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -64,5 +62,5 @@ jobs:
position: 'bottom',
column_id: initial_review.id,
}).catch(error => {
console.error("Error occured while moving card to 'Initial Review'!")
console.error("Error occured while moving card to 'Initial Review': {error}")
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
})
8 changes: 3 additions & 5 deletions .github/workflows/move-work-in-progress-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
move-pr-to-wip:
if: github.event.comment.body == '/pr mark wip' && github.event.issue.pull_request
if: contains(github.event.comment.body, '/pr mark wip') && github.event.issue.pull_request
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- name: Move To Work In Progress
Expand All @@ -23,9 +23,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
})
const code_reviews = projects.data.find(project => {
return project.name === 'Code Reviews';
})
const code_reviews = projects.data.find(project => project.name === 'Code Reviews');
if (!code_reviews) {
console.error("'Code Reviews' project not found!")
return
Expand Down Expand Up @@ -61,7 +59,7 @@ jobs:
position: 'bottom',
column_id: work_in_progress.id,
}).catch(error => {
console.error("Error occured while moving card to Work In Progress!")
console.error("Error occured while moving card to 'Work In Progress': {error}")
})
}
})
Expand Down