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

Run Pre-commit GHA for each commit #93

Closed
wants to merge 2 commits into from
Closed
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
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
Expand All @@ -13,10 +12,8 @@ A clear and concise description of what the bug is.
**Input given at the prompt**
What you entered.


**Response that was received**
What you received in response to your input.


**Response that was expected**
What you expected to receive instead.
4 changes: 0 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ If your PR is related to a contribution to the taxonomy, please, fill
out the following questionaire. If not, replace this whole text and the
following questionaire with whatever information is applicable to your PR.


**Describe the contribution to the taxonomy**

<!-- A concise description of what the contribution brings, replace "..." in the bullet list -->
Expand All @@ -11,7 +10,6 @@ following questionaire with whatever information is applicable to your PR.
- ...
- ...


**Input given at the prompt**

<!-- What you entered, replace "..." -->
Expand All @@ -20,7 +18,6 @@ following questionaire with whatever information is applicable to your PR.
...
```


**Response that was received**

<!-- What you received in response to your input, replace "..." -->
Expand All @@ -29,7 +26,6 @@ following questionaire with whatever information is applicable to your PR.
...
```


**Response that is now received instead**

<!-- What you receive with your contribution, replace "..." -->
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Copyright The InstructLab Authors, 2024
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -18,7 +19,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- main
pull_request:
branches:
- main
Expand All @@ -29,7 +30,7 @@ jobs:
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Run YAML linter"
run: |
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}, yaml-files: ['qna.yaml']}" .
35 changes: 35 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: pre-commit

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-go@v5
with:
go-version: '>=1.18'
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('**/.pre-commit-config.yaml/*') }}
restore-keys: |
${{ runner.os }}-precommit-

- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party =
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
exclude: "index.json|^themes/"
fail_fast: true
repos:
- hooks:
Expand Down Expand Up @@ -47,7 +46,7 @@ repos:
- id: forbid-new-submodules
- args:
- --branch
- gh-pages
- main
id: no-commit-to-branch
- id: requirements-txt-fixer
- id: sort-simple-yaml
Expand Down
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ Before submitting pull requests, make sure your changes pass applicable formatti
You can contribute either Knowledge or Skills to the taxonomy. Make sure to review the [general documentation](README.md) for a detail explanation of these concepts and the differences between the two.

You can then either:

- add new examples to existing leaf nodes by expanding the corresponding qna.yaml files
- or add new branches by creating new folders under existing ones and creating new qna.yaml files

**Note** that you can only contribute original material. **DO NOT** contribute copyrighted content or content coming from another system.
**Note** that you can only contribute original material. **DO NOT** contribute copyrighted content or content coming from another system.

### Submitting your contribution

Expand Down
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Loading
Loading