-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from nyuhpc/minh/add-conventional-commits-and-r…
…elease-please chore: add repo tools
- Loading branch information
Showing
5 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,73 @@ | ||
# GH-### | ||
|
||
<!-- | ||
If applicable, insert the Github issue or pull request number in the markdown header above. | ||
The hyperlink will be filled in by GitHub magic ([Autolinked references and URLs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls)) | ||
---> | ||
|
||
## Linked Issues | ||
|
||
<!-- | ||
If applicable, insert the Github issue or pull request number in the markdown below. | ||
The hyperlink will be filled in by GitHub magic ([Linking a pull request to an issue using a keyword.](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)) | ||
The issue will be resolved by the merging of this Pull Request | ||
---> | ||
|
||
resolves GH-### | ||
|
||
## Proposed changes | ||
|
||
<!-- description and/or list of proposed changes --> | ||
|
||
--- | ||
|
||
<!-- | ||
Please add/remove/edit any of the template below to fit the needs | ||
of this specific PR | ||
---> | ||
|
||
## Reviewer notes | ||
|
||
<!-- | ||
Is there anything you would like reviewers to give additional scrutiny? | ||
---> | ||
|
||
## Setup | ||
|
||
<!-- | ||
Add any steps or code to run in this section to help others run your code: | ||
```sh | ||
echo "Code goes here" | ||
``` | ||
---> | ||
|
||
### Start the system | ||
|
||
<!-- | ||
How can a tester start this system, log in, and test the deliverables? | ||
---> | ||
|
||
```sh | ||
# startup script here | ||
``` | ||
|
||
<!-- | ||
Link the GCP Project | ||
---> | ||
Login to GCP Console Project: | ||
|
||
--- | ||
|
||
## Screenshots | ||
|
||
<!-- If this PR makes visible interface changes, an image of the finished interface can help reviewers | ||
and casual observers understand the context of the changes. | ||
A before image is optional and can be included at the submitter's discretion. | ||
Consider using an animated image to show an entire workflow. | ||
You may want to use GIPHY CAPTURE for this! 📸 | ||
_Please frame images to show useful context but also highlight the affected regions._ | ||
---> |
This file contains 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,24 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
with: | ||
# this assumes that you have created a personal access token | ||
# (PAT) and configured it as a GitHub action secret named | ||
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). | ||
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | ||
# this is a built-in strategy in release-please, see "Action Inputs" | ||
# for more options | ||
release-type: simple |
This file contains 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,36 @@ | ||
name: Lint PR | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, edited, synchronize] | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md**' | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Lint pr title | ||
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 | ||
with: | ||
wip: true | ||
types: | | ||
build | ||
chore | ||
ci | ||
dev | ||
docs | ||
feat | ||
fix | ||
perf | ||
refactor | ||
revert | ||
style | ||
test | ||
security | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,40 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- id: pretty-format-json | ||
args: | ||
- --autofix | ||
# - id: trailing-whitespace | ||
- id: check-symlinks | ||
# - id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.16 | ||
hooks: | ||
- id: mdformat | ||
additional_dependencies: | ||
- mdformat-gfm | ||
- mdformat-toc | ||
# mdformat fights with terraform_docs | ||
exclude: README.m(ark)?d(own)? | ||
- repo: https://github.com/google/yamlfmt | ||
rev: v0.10.0 | ||
hooks: | ||
- id: yamlfmt | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.27.3 | ||
hooks: | ||
- id: check-jsonschema | ||
args: ["--builtin-schema", "vendor.cloudbuild"] | ||
types: [yaml] | ||
files: ".cloudbuild.yaml" | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.86.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs |
This file contains 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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# terraform-google-compute | ||
Provisions Compute Engine Resources in Google Cloud Platform | ||
|
||
|
||
## pre-commit | ||
|
||
`pre-commit` is a tool that allows us to run git hook scripts that identify simple issues before code is commited and submitted for review. To install pre-commit, follow the instructions [here](https://pre-commit.com/#install). Run `pre-commit install` in the directory where you want to set up the git hook scripts (root of this repository in this case). Now pre-commit will check your files whenever you `git commit` | ||
|
||
Note: The git hooks may lint and fix the syntax of your files. You can always look at the `git diff` of those files. If the changes are good, `git add` the file and try committing again. |