|
| 1 | +--- |
| 2 | +name: autoclose comment |
| 3 | +# Post comment on PRs when labeled with "status: autoclose candidate". |
| 4 | +# Based on scikit-learn's autoclose bot at |
| 5 | +# https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/autoclose-comment.yml |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + pull-requests: write |
| 10 | + |
| 11 | +on: |
| 12 | + pull_request_target: |
| 13 | + types: |
| 14 | + - labeled |
| 15 | + |
| 16 | +env: |
| 17 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + GH_REPO: ${{ github.repository }} |
| 19 | + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} |
| 20 | + |
| 21 | +jobs: |
| 22 | + post_comment: |
| 23 | + name: post_comment |
| 24 | + if: "${{ contains(github.event.label.name, 'status: autoclose candidate') }}" |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + steps: |
| 28 | + |
| 29 | + - name: comment on potential autoclose |
| 30 | + run: | |
| 31 | + gh api \ |
| 32 | + --method POST \ |
| 33 | + -H "Accept: application/vnd.github+json" \ |
| 34 | + -H "X-GitHub-Api-Version: 2022-11-28" \ |
| 35 | + /repos/$GH_REPO/issues/$PULL_REQUEST_NUMBER/comments \ |
| 36 | + -f "body=$BODY" |
| 37 | + env: |
| 38 | + BODY: > |
| 39 | + ⏰ This pull request might be automatically closed in two weeks from now. |
| 40 | +
|
| 41 | +
|
| 42 | + Thank you for your contribution to Matplotlib and for the effort you |
| 43 | + have put into this PR. This pull request does not yet meet the |
| 44 | + quality and clarity standards needed for an effective review. |
| 45 | + Project maintainers have limited time for code reviews, and our goal |
| 46 | + is to prioritize well-prepared contributions to keep Matplotlib |
| 47 | + maintainable. |
| 48 | +
|
| 49 | +
|
| 50 | + Matplotlib maintainers cannot provide one-to-one guidance on this PR. |
| 51 | + However, if you ask focused, well-researched questions, a community |
| 52 | + member may be willing to help. 💬 |
| 53 | +
|
| 54 | +
|
| 55 | + To increase the chance of a productive review: |
| 56 | +
|
| 57 | + - Use [the template provided in the PR |
| 58 | + description](https://github.com/matplotlib/matplotlib/blob/main/.github/PULL_REQUEST_TEMPLATE.md) |
| 59 | + and fill it out as completely as possible, especially the summary and AI Disclosure sections. |
| 60 | +
|
| 61 | + - Make sure your PR conforms to our [PR |
| 62 | + checklist](https://matplotlib.org/devdocs/devel/pr_guide.html#summary-for-pull-request-authors). |
| 63 | +
|
| 64 | +
|
| 65 | + As the author, you are responsible for driving this PR, which entails doing |
| 66 | + necessary background research as well as presenting its context and your |
| 67 | + thought process. If you are a new contributor, or do not know how to |
| 68 | + fulfill these requirements, we recommend that you familiarize |
| 69 | + yourself with Matplotlib's |
| 70 | + [development conventions](https://matplotlib.org/devdocs/devel/index.html) |
| 71 | + or engage with the community via our [Discourse](https://discourse.matplotlib.org/) |
| 72 | + or one of our [meetings](https://scientific-python.org/calendars/) |
| 73 | + before submitting code. |
| 74 | +
|
| 75 | +
|
| 76 | + If you substantially improve this PR within two weeks, leave a comment |
| 77 | + and a team member may remove the `status: autoclose candidate` label and the |
| 78 | + PR stays open. Cosmetic changes or incomplete fixes will not be |
| 79 | + sufficient. Maintainers will assess improvements on their own |
| 80 | + schedule. Please do not ping (`@`) maintainers. |
0 commit comments