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

Create pull_request_template.md, update README, and auto-close PRs with message #11

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changes to This Repository Should Be Made in pecanproject/pecan

Thank you for your interest in contributing to the PEcAn documentation!

However, this repository is **automatically maintained** and synchronized from the `book_source/` directory of the [github.com/pecanproject/pecan](https://github.com/pecanproject/pecan) repository.

HTML files in this repository are maintained as Markdown (MD) files in the source repository.

If you have suggestions or improvements, please submit pull requests to the source repository instead.

We appreciate your understanding and your effort to contribute!
26 changes: 26 additions & 0 deletions .github/workflows/auto-close-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Auto Close Pull Requests
on:
pull_request:
types:
- opened
permissions:
pull-requests: write
jobs:
close-pr:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Authenticate with GH CLI
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Close PR
run: >
gh pr close "${{ github.event.pull_request.number }}" \
--repo "${{ github.repository }}" \
--comment "Thank you for your interest in contributing to PEcAn documentation!\n\nThis repository is automatically maintained and synchronized from the book_source/ directory of the [pecanproject/pecan](https://github.com/pecanproject/pecan) repository.\n\nPlease submit your pull request there instead:\n[pecanproject/pecan](https://github.com/pecanproject/pecan)\n\nWe appreciate your effort and understanding!"
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# PEcAn Documentation Auto-build Repository

Maintained by Robots: The materials here are compiled by Github Actions from source text in the main PEcAn repository (github.com/pecanproject/pecan). Please open issues and pull requests there.
### :warning: This repository is **automatically maintained**. :warning:

### **Pull requests** should be opened in the source repository.


- Source text is maintained in the `book_source/` directory of the PEcAn repository ([pecanproject/pecan](https://github.com/pecanproject/pecan)).
- The content here is compiled from the source repository via **GitHub Actions**.

### Thank you for your interest in contributing to PEcAn

And in particular, for helping improve our documentation!