From 2274d89d5d9ee6d3db9a7913bf18b83ecce58adb Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Mon, 3 Jul 2023 16:29:07 +0100 Subject: [PATCH] repo setup --- .github/PULL_REQUEST_TEMPLATE.md | 13 ++++ .github/workflows/shortlog.yml | 22 +++++++ .github/workflows/update_copyright.yml | 45 ++++++++++++++ CONTRIBUTING.md | 85 ++++++++++++++++++++++++++ README.md | 32 ++++++++++ 5 files changed, 197 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/shortlog.yml create mode 100644 .github/workflows/update_copyright.yml create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8b361bf --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ + + +**Check List** + +- [ ] I have read `CONTRIBUTING.md` and added my name as a Code Contributor. +- [ ] Contains logically grouped changes (else tidy your branch by rebase). diff --git a/.github/workflows/shortlog.yml b/.github/workflows/shortlog.yml new file mode 100644 index 0000000..7998d92 --- /dev/null +++ b/.github/workflows/shortlog.yml @@ -0,0 +1,22 @@ +name: check contributor list + +on: + workflow_dispatch: + pull_request: + paths: + - 'CONTRIBUTING.md' + - '.github/workflows/shortlog.yml' + - '.mailmap' + +jobs: + test: + runs-on: 'ubuntu-latest' + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # need to fetch all commits to check contributors + + - name: Check CONTRIBUTING.md + uses: cylc/release-actions/check-shortlog@v1 diff --git a/.github/workflows/update_copyright.yml b/.github/workflows/update_copyright.yml new file mode 100644 index 0000000..6e1aa4a --- /dev/null +++ b/.github/workflows/update_copyright.yml @@ -0,0 +1,45 @@ +name: Update copyright year + +on: + schedule: + - cron: '0 4 1 1 *' # Every Jan 1st @ 04:00 UTC + +jobs: + update-copyright: + if: github.repository_owner == 'cylc' + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Configure git + uses: cylc/release-actions/configure-git@v1 + + - name: Checkout PR branch + uses: cylc/release-actions/checkout-copyright-branch@v1 + + - name: Update copyright year + env: + README_FILE: 'README.md' + run: | + pattern="().*(<\/span>)" + sed -i -E "s/${pattern}/\1${YEAR}\2/" "$README_FILE" + + pattern="(_copyright_year ?= ?)[^ #]*(.*)" + sed -i -E "s/${pattern}/\1${YEAR}\2/" "$SCRIPTS_INIT_FILE" + + - name: Commit & push + run : | + git commit -a -m "Update copyright year" -m "Workflow: ${{ github.workflow }}, run: ${{ github.run_number }}" + git push + + - name: Create pull request + uses: cylc/release-actions/create-pr@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + head: ${{ env.BRANCH_NAME }} + title: 'Auto PR: update copyright year' + body: 'Happy new year!' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..482d3de --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +# Cylc: How to Contribute + +Thanks for you interest in the Cylc project! + +Contributions are welcome, please open an issue to discuss changes before +raising a pull request. + +You can also get in touch via: + +* The developers chat: [![chat](https://img.shields.io/matrix/cylc-general:matrix.org)](https://matrix.to/#/#cylc-general:matrix.org) +* The forum: [![forum](https://img.shields.io/discourse/https/cylc.discourse.group/posts.svg)](https://cylc.discourse.group/) + + +## New Contributors + +Please read the [CLA](#contributor-licence-agreement-and-certificate-of-origin). + +Please add your name to the +[Code Contributors](#code-contributors) section of this file as part of your +first Pull Request (for each Cylc repository you contribute to). + +Feel free to ask questions on the issue or +[developers chat](https://matrix.to/#/#cylc-general:matrix.org) if unsure about +anything. + + +## Code Contributors + +The following people have contributed to this code under the terms of +the Contributor Licence Agreement and Certificate of Origin detailed +below (_except for the parenthesised names, which represent contributions +from outside of NIWA and the Met Office that predate the explicit introduction +of this Agreement in July 2018; they must be un-parenthesised in future pull +requests_). + + + - Oliver Sanders + + +(All contributors are identifiable with email addresses in the git version +control logs or otherwise.) + + +## Contributor Licence Agreement and Certificate of Origin + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I have + the right to submit it, either on my behalf or on behalf of my + employer, under the terms and conditions as described by this file; + or + +(b) The contribution is based upon previous work that, to the best of + my knowledge, is covered under an appropriate licence and I have + the right or permission from the copyright owner under that licence + to submit that work with modifications, whether created in whole or + in part by me, under the terms and conditions as described by + this file; or + +(c) The contribution was provided directly to me by some other person + who certified (a) or (b) and I have not modified it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including my + name and email address) is retained for the full term of + the copyright and may be redistributed consistent with this project + or the licence(s) involved. + +(e) I, or my employer, grant to NIWA and all recipients of + this software a perpetual, worldwide, non-exclusive, no-charge, + royalty-free, irrevocable copyright licence to reproduce, modify, + prepare derivative works of, publicly display, publicly perform, + sub-licence, and distribute this contribution and such modifications + and derivative works consistent with this project or the licence(s) + involved or other appropriate open source licence(s) specified by + the project and approved by the + [Open Source Initiative (OSI)](http://www.opensource.org/). + +(f) If I become aware of anything that would make any of the above + inaccurate, in any way, I will let NIWA know as soon as + I become aware. + +(The Cylc Contributor Licence Agreement and Certificate of Origin is +inspired that of [Rose](https://github.com/metomi/rose), which in turn was +inspired by the Certificate of Origin used by Enyo and the Linux Kernel.) diff --git a/README.md b/README.md new file mode 100644 index 0000000..1eba8c8 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# cylc.vim + +**Vim plugin providing support for the Cylc language.** + +[Cylc Website](https://cylc.org/) | +[Contributing](CONTRIBUTING.md) | +[Forum](https://cylc.discourse.group/) | +[![Chat](https://img.shields.io/matrix/cylc-general:matrix.org)](https://matrix.to/#/#cylc-general:matrix.org) + + +### Developing + +Contributions welcome, read the [contributing](CONTRIBUTING.md) page and +add yourself to the contributors list with your first pull request. + + +### Copyright and Terms of Use + +[![License](https://img.shields.io/github/license/cylc/cylc-flow.svg?color=lightgrey)](https://github.com/cylc/cylc-flow/blob/master/COPYING) + +Copyright (C) 2008-2023 NIWA & British Crown (Met Office) & Contributors. + +Cylc is free software: you can redistribute it and/or modify it under the terms +of the GNU General Public License as published by the Free Software Foundation, +either version 3 of the License, or (at your option) any later version. + +Cylc is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +Cylc. If not, see [GNU licenses](http://www.gnu.org/licenses/).