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

Ingestion checklist - managing pr with empty descriptions #3665

Closed
Closed
Show file tree
Hide file tree
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
24 changes: 18 additions & 6 deletions .github/workflows/link-to-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ jobs:
script: |
const fs = require('fs');
const review_checklist = fs.readFileSync('.github/ingestion-review-checklist.md', 'utf8');
github.rest.pulls.update({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: context.payload.pull_request.body + review_checklist,
});
const old_description = context.payload.pull_request.body || '';
if (!old_description.trim()) {
await github.rest.pulls.update({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: review_checklist,
});
console.log('Pull request description was empty. Updated with review checklist.');
} else {
await github.rest.pulls.update({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: context.payload.pull_request.body + review_checklist,
});
console.log('Pull request description was not empty. Appended review checklist.');
}
1 change: 1 addition & 0 deletions .github/workflows/print-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ jobs:
echo "Event Name: ${{ github.event_name }}"
echo "Action: ${{ github.event.action }}"
echo "PR Title: ${{ github.event.pull_request.title }}"
echo "Original PR Body: ${{ github.event.pull_request.body }}"
Loading