-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove pull request template #18104
base: main
Are you sure you want to change the base?
Remove pull request template #18104
Conversation
Replace with an updated check-change-note.yml workflow. Add a comment whenever a pull request has changes that may need to be tested in autofix. Also, remove parts of the checklist that are not related to autofix.
The new workflow job won't run until this PR is merged since it runs under |
- "!**/experimental/**" | ||
- "!ql/**" | ||
- "!rust/**" | ||
- ".github/workflows/check-change-note.yml" | ||
|
||
jobs: | ||
add-pr-reminders: | ||
env: | ||
REPO: ${{ github.repository }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REPO: ${{ github.repository }} |
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
explains GITHUB_REPOSITORY
as
The owner and repository name. For example, octocat/Hello-World.
So we can skip declaring our own variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just following along with REPO
elsewhere in the file. Looking in history, I see that REPO
was added 13 months ago...by you. 😄
Is there a reason to change it in this job, but not the other?
|
||
- name: Check if the 'reminders' comment exists | ||
run: | | ||
reminder_comment=$(gh api "repos/$REPO/issues/$PULL_REQUEST_NUMBER/comments" --jq '.[] | select(.body | test("### Pull Request reminders for autofix"))') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder_comment=$(gh api "repos/$REPO/issues/$PULL_REQUEST_NUMBER/comments" --jq '.[] | select(.body | test("### Pull Request reminders for autofix"))') | |
reminder_comment=$(gh api "repos/$GITHUB_REPOSITORY/issues/$PULL_REQUEST_NUMBER/comments" --jq '.[] | select(.body | test("### Pull Request reminders for autofix"))') |
echo "The reminder comment does not exist. Adding it." | ||
comment_body="$(cat .github/pr-comment-reminder.md)" | ||
|
||
gh api "repos/$REPO/issues/$PULL_REQUEST_NUMBER/comments" -f body="$comment_body" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh api "repos/$REPO/issues/$PULL_REQUEST_NUMBER/comments" -f body="$comment_body" | |
gh api "repos/$GITHUB_REPOSITORY/issues/$PULL_REQUEST_NUMBER/comments" -f body="$comment_body" |
Replace with an updated check-change-note.yml workflow.
Add a comment whenever a pull request has changes that may need to be tested in autofix. Also, remove parts of the checklist that are not related to autofix.