Skip to content

Commit

Permalink
build: leave message when autoclose: Git history label is assigned
Browse files Browse the repository at this point in the history
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---

---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
  - task: run_javascript_examples
    status: na
  - task: run_c_examples
    status: na
  - task: run_cpp_examples
    status: na
  - task: run_javascript_readme_examples
    status: na
  - task: run_c_benchmarks
    status: na
  - task: run_cpp_benchmarks
    status: na
  - task: run_fortran_benchmarks
    status: na
  - task: run_javascript_benchmarks
    status: na
  - task: run_julia_benchmarks
    status: na
  - task: run_python_benchmarks
    status: na
  - task: run_r_benchmarks
    status: na
  - task: run_javascript_tests
    status: na
---
  • Loading branch information
Planeshifter committed Mar 4, 2025
1 parent b947812 commit aab2efb
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/autoclose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,44 @@ jobs:
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one.
We appreciate your interest in contributing to stdlib!
# Define a job which closes a pull request if a PR has an inappropriate Git history:
git_history:

# Define job name:
name: 'Check for Git History label'

# Only run this job if the pull request has a specific label:
if: "${{ github.event.label.name == 'autoclose: Git History' }}"

# Define job permissions:
permissions:
contents: read
pull-requests: write

# Define the type of virtual host machine:
runs-on: ubuntu-latest

# Define the sequence of job steps:
steps:

# Close the pull request:
- name: 'Close pull request'
run: gh pr close "$NUMBER" --comment "$BODY"
env:
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
BODY: |
Thank you for working on this pull request. However, we cannot accept your contribution due to Git history issues.
Some common issues include:
- Merge conflicts
- Inappropriate commit messages
- Unrelated commits
- Including changes from merged branches that weren't intended for this PR
We recommend opening a new pull request with only the intended changes.
Thank you for your interest in stdlib, and we look forward to your future contributions.

0 comments on commit aab2efb

Please sign in to comment.