Skip to content

Commit

Permalink
fix CODE_OF_CONDUCT, CONTRIBUTING, and README lints
Browse files Browse the repository at this point in the history
  • Loading branch information
davepmiller committed Dec 16, 2023
1 parent a35cebc commit 4055e38
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 22 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker://avtodev/markdown-lint:v1.5
- name: CHANGELOG.md
uses: docker://avtodev/markdown-lint:v1.5
with:
rules: '/lint/rules/changelog.js'
config: '/lint/config/changelog.yml'
args: './CHANGELOG.md ./README.md ./CONTRIBUTING.md ./CODE_OF_CONDUCT.md'
args: './CHANGELOG.md'
- name: README.md CONTRIBUTING.md CODE_OF_CONDUCT.md
uses: docker://avtodev/markdown-lint:v1.5
with:
args: './README.md ./CONTRIBUTING.md ./CODE_OF_CONDUCT.md'
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Code of Conduct

If it ain't broke...[Rust Code of Conduct](https://www.rust-lang.org/conduct.html)
If it ain't broke...[Rust Code of Conduct](https://www.rust-lang.org/conduct.html)
32 changes: 23 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
# Contributing to Cliflare

## Please do!
## Please do

* Fork
* Branch
* Do the things
* Update [CHANGELOG](#changelog) to reflect the things
* Commit
* Push
* Pull request

This is my first project as a Rustacean, so _**please**_ let me know if I'm missing the mark on anything. It takes a village, and my mom tells me that I'm very easy to work with.
This is my first project as a Rustacean.
_**please**_ let me know if I'm missing the mark on anything.
My mom tells me that I'm very easy to work with.

Let's stick with the [Rust Code of Conduct](https://www.rust-lang.org/conduct.html).

## Changelog

This project follows semantic versioning.

Possible log types:

- `[added]` for new features.
- `[changed]` for changes in existing functionality.
- `[deprecated]` for once-stable features removed in upcoming releases.
- `[removed]` for deprecated features removed in this release.
- `[fixed]` for any bug fixes.
- `[security]` to invite users to upgrade in case of vulnerabilities.
* `[Added]` for new features.
* `[Changed]` for changes in existing functionality.
* `[Deprecated]` for once-stable features removed in upcoming releases.
* `[Removed]` for deprecated features removed in this release.
* `[Fixed]` for any bug fixes.
* `[Security]` to invite users to upgrade in case of vulnerabilities.

Lint markdown locally:

```bash
docker run --rm \
-v "$(pwd)/CHANGELOG.md:/CHANGELOG.md:ro" \
avtodev/markdown-lint:v1 \
--rules /lint/rules/changelog.js \
--config /lint/config/changelog.yml \
/CHANGELOG.md
```
44 changes: 34 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,112 @@
# β˜οΈπŸš€ cliflare πŸš€β˜οΈ

![build](https://github.com/davepmiller/cliflare/actions/workflows/ci.yml/badge.svg?branch=main)
![publish](https://github.com/davepmiller/cliflare/actions/workflows/publish.yml/badge.svg?branch=main)
[![Coverage Status](https://coveralls.io/repos/github/davepmiller/cliflare/badge.svg)](https://coveralls.io/github/davepmiller/cliflare)
![crates.io](https://img.shields.io/crates/v/cliflare.svg)
![downloads](https://img.shields.io/crates/d/cliflare)
[![license](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)

* πŸ›  CLI️ to interact with Cloudflare APIs.
* πŸ›  CLI️ to interact with Cloudflare APIs
* πŸ₯³ An excuse to write some Rust
* πŸ‘· Under heavy development!!! Happy for help!
* πŸ‘· Under heavy development

## Setup

#### Setup:
* [Install Rust πŸ“](https://www.rust-lang.org/tools/install)

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

* Install

```bash
cargo install cliflare
```

* [Generate a Cloudflare API token πŸ“](https://developers.cloudflare.com/cloudflare-one/api-terraform/scoped-api-tokens/)
* [Grab Account And Zone IDs πŸ“](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/)
* Environment

```bash
# add your token value to a startup script
echo CLOUDFLARE_TOKEN=abcd1234**API_TOKEN**4321dcba >> ~/.zshrc
echo CLOUDFLARE_ACCOUNT_ID=abcd1234**ACCOUNT_ID**4321dcba >> ~/.zshrc
```
#### Examples:

## Examples

* [Token Verify πŸ“](https://developers.cloudflare.com/api/operations/user-api-tokens-verify-token)

```bash
cliflare token verify
```

* [Zone List πŸ“](https://developers.cloudflare.com/api/operations/zones-get)

```bash
# print out all zone info
cliflare zone list
# print only zone "name" field -- i.e. domains
cliflare zone list --domains
```

* [Create a Zone πŸ“](https://developers.cloudflare.com/api/operations/zones-post)

```bash
cliflare zone create newzone.com
```

* [Delete a Zone πŸ“](https://developers.cloudflare.com/api/operations/zones-0-delete)

```bash
cliflare zone delete newzone.com
```

* [List DNS Records For A Zone πŸ“](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records)

```bash
cliflare dns list --zone_id <ZONE_ID>
cliflare dns list -i <ZONE_ID>
cliflare dns list --zone_name <DOMAIN>
cliflare dns list -n <DOMAIN>
```

* [Export DNS Records For A Zone πŸ“](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-export-dns-records)

```bash
cliflare dns export --zone_id <ZONE_ID>
cliflare dns export -i <ZONE_ID>
cliflare dns export --zone_name <DOMAIN>
cliflare dns export -n <DOMAIN>
```

* [Import DNS Records For A Zone πŸ“](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-import-dns-records)

```bash
cliflare dns import --file <PATH> --zone_id <ZONE_ID>
cliflare dns import -f <PATH> -i <ZONE_ID>
cliflare dns import -file <PATH> --zone_name <DOMAIN>
cliflare dns import -f <PATH> -n <DOMAIN>
```

#### Coming Soon:
## Coming Soon

* [Create DNS Record For A Zone](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-create-dns-record)
* Parameterize [Pagination Options](https://developers.cloudflare.com/fundamentals/api/how-to/make-api-calls/#pagination)

#### Coming Soonish:
## Coming Soonish

* Create WAF rules
* Create redirect rules
* Create some other rules
* Add parameters to `zone create` for customization
* Homebrew setup

### Feature Requests?
Awesome!

Fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfDBhmvtRn1C3Vzi_nplHV9QyBVbPUfdqhziUj_sWYyi-XIFw/viewform?usp=sf_link) and I'll get back to you.
## Feature Requests

Awesome!

Fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfDBhmvtRn1C3Vzi_nplHV9QyBVbPUfdqhziUj_sWYyi-XIFw/viewform?usp=sf_link)
and I'll get back to you.

0 comments on commit 4055e38

Please sign in to comment.