-
Notifications
You must be signed in to change notification settings - Fork 6
Use repo-file-sync-action to standardise pre-commit-config.yaml
#23
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
609dead
Introduce template synchronisation.
trexfeathers c75b788
Changes to enable demonstration.
trexfeathers 4e7f7ae
Try Skyvern-AI fork.
trexfeathers 68ceccc
Revert "Try Skyvern-AI fork."
trexfeathers 2916dc9
Try rasa fork.
trexfeathers 445802f
Revert "Try rasa fork."
trexfeathers 99e8ab1
Quote PR_BODY.
trexfeathers 6a88260
Deliberate error.
trexfeathers fdb9293
Revert "Deliberate error."
trexfeathers b586e2e
Correct CONFIG_PATH.
trexfeathers e890808
Further changes to allow demonstration.
trexfeathers 932e96c
Better messages.
trexfeathers 621c3b2
Demo URL.
trexfeathers 92930f9
Revert "Demo URL."
trexfeathers c0b477a
Revert "Further changes to allow demonstration."
trexfeathers 33d12ba
Revert "Changes to enable demonstration."
trexfeathers fb24556
Include iris-grib.
trexfeathers ec246e5
Merge branch 'main' into sync-action
HGWright File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Note: SciTools/cartopy is managed by a separate development team so is not | ||
| # included in the templating. | ||
|
|
||
| SciTools/cf-units: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/iris: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/iris-grib: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/mo_pack: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/nc-time-axis: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/python-stratify: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/tephi: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/test-iris-imagehash: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
| SciTools/workflows: | ||
| - source: templates/.pre-commit-config.yaml | ||
| dest: .pre-commit-config.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Sync template files across repos | ||
| on: | ||
| schedule: | ||
| # "At 02:00 on day-of-month 1 in every 2nd month." | ||
| - cron: '0 2 1 */2 *' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| sync: | ||
| if: "github.repository_owner == 'SciTools' || github.event_name == 'workflow_dispatch'" | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - id: generate-token | ||
| uses: tibdex/github-app-token@v2 | ||
| with: | ||
| app_id: ${{ secrets.AUTH_APP_ID }} | ||
| private_key: ${{ secrets.AUTH_APP_PRIVATE_KEY }} | ||
|
|
||
| - uses: BetaHuhn/repo-file-sync-action@3023dac7ce66c18b119e2012348437eadeaea116 | ||
| with: | ||
| GH_INSTALLATION_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
| CONFIG_PATH: .github/template-sync.yml | ||
| PR_LABELS: | | ||
| Bot | ||
| Type: Infrastructure | ||
| COMMIT_PREFIX: "👁 TEMPLATE DEVIATIONS:" | ||
| PR_BODY: "## Please read: https://github.com/SciTools/.github/tree/main/templates" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # See https://pre-commit.com for more information | ||
| # See https://pre-commit.com/hooks.html for more hooks | ||
|
|
||
| files: | | ||
| (?x)( | ||
| noxfile\.py| | ||
| setup\.py| | ||
| docs\/.+\.py| | ||
| benchmarks\/.+\.py| | ||
| ) | ||
| minimum_pre_commit_version: 1.21.0 | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.5.0 | ||
| hooks: | ||
| # Prevent giant files from being committed. | ||
| - id: check-added-large-files | ||
| # Check whether files parse as valid Python. | ||
| - id: check-ast | ||
| # Check for file name conflicts on case-insensitive filesytems. | ||
| - id: check-case-conflict | ||
| # Check for files that contain merge conflict strings. | ||
| - id: check-merge-conflict | ||
| # Check for debugger imports and py37+ `breakpoint()` calls in Python source. | ||
| - id: debug-statements | ||
| # Don't commit to main branch. | ||
| - id: no-commit-to-branch | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: "v0.3.4" | ||
| hooks: | ||
| - id: ruff | ||
| types: [file, python] | ||
| args: [--fix, --show-fixes] | ||
| - id: ruff-format | ||
| types: [file, python] | ||
|
|
||
| - repo: https://github.com/codespell-project/codespell | ||
| rev: "v2.2.6" | ||
| hooks: | ||
| - id: codespell | ||
| types_or: [asciidoc, python, markdown, rst] | ||
| additional_dependencies: [tomli] | ||
|
|
||
| - repo: https://github.com/PyCQA/flake8 | ||
| rev: 7.0.0 | ||
| hooks: | ||
| - id: flake8 | ||
| types: [file, python] | ||
|
|
||
| - repo: https://github.com/asottile/blacken-docs | ||
| rev: 1.16.0 | ||
| hooks: | ||
| - id: blacken-docs | ||
| types: [file, rst] | ||
|
|
||
| - repo: https://github.com/aio-libs/sort-all | ||
| rev: v1.2.0 | ||
| hooks: | ||
| - id: sort-all | ||
| types: [file, python] | ||
|
|
||
| - repo: https://github.com/numpy/numpydoc | ||
| rev: v1.7.0 | ||
| hooks: | ||
| - id: numpydoc-validation | ||
| types: [file, python] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| These files are templates defining the standard format across all SciTools | ||
| repos. Repo deviations from template are periodically identified in pull | ||
| requests by the repo-file-sync-action. | ||
|
|
||
| ### Possible actions on a deviation pull request | ||
|
|
||
| - ✔️ **Merge** - all deviations are re-aligned with the template | ||
| (E.g. the repo is simply out of date and needs updating). | ||
| - ❌ **Close** - all deviations are kept | ||
| (E.g. all deviations are required repo-specific detail). | ||
| - ️️✏️ **Edit** - re-align some deviations, keep others. | ||
| - 🏃 **Close then action independently** | ||
| (E.g. the repo contains content that should be added to the template). | ||
|
|
||
| ### Further reading | ||
|
|
||
| - https://github.com/marketplace/actions/repo-file-sync-action | ||
| - [../.github/workflows/template-sync.yml](../.github/workflows/template-sync.yml) | ||
| - [../.github/template-sync.yml](../.github/template-sync.yml) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.