Skip to content
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
116 changes: 116 additions & 0 deletions .github/workflows/draft-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: "Perform Initial Repository Setup"

on:
push:
branches: [main]

jobs:
pre:
name: "Setup Repository"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rfc
outputs:
skip: ${{ steps.pre.outputs.skip }}
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Precondition Check"
id: pre
run: |
if ! ls draft-* rfc* 2>/dev/null | grep -qv draft-todo-yourname-protocol.md; then
{
echo "------------------------------------------------------------"
echo "Skipping setup for the first commit."
echo
echo "Rename draft-todo-yourname-protocol.md to start using this repository:"
echo
echo "> https://github.com/${{github.repository}}/edit/main/draft-todo-yourname-protocol.md"
echo
echo "Change the name of the file and its title."
echo "Commit the changes to the 'main' branch."
echo
echo "------------------------------------------------------------"
} >>"$GITHUB_STEP_SUMMARY"
echo "skip=true" >>"$GITHUB_OUTPUT"
elif [ ! -f draft-todo-yourname-protocol.md -a -f Makefile ]; then
{
echo "------------------------------------------------------------"
echo "Skipping setup for an already-configured repository."
echo
echo "Delete .github/workflows/setup.yml to avoid running this action:"
echo
echo "> https://github.com/${{github.repository}}/delete/main/.github/workflows/setup.yml"
echo
echo "------------------------------------------------------------"
} >>"$GITHUB_STEP_SUMMARY"
echo "skip=true" >>"$GITHUB_OUTPUT"
else
echo "skip=false" >>"$GITHUB_OUTPUT"
fi

setup:
name: "Setup Repository"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rfc
needs: pre
if: ${{ needs.pre.outputs.skip != 'true' }}
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Git Config"
run: |
git config user.email "[email protected]"
git config user.name "I-D Bot"

- name: "Update Draft Name"
run: |
for i in draft-*; do
if [ "$(head -1 "$i")" = "---" ]; then
sed -i -e '2,/^---/{/^###/,/^###/d
s|^docname: .*|docname: '"${i%.md}-latest"'|
s|^ fullname: Your Name Here| fullname: "'"$(git show -q --format='format:%aN' @)"'"|
s|^ email: your\.email@example\.com| email: "'"$(git show -q --format='format:%aE' @)"'"|
}' "$i"
fi
sed -i -e "s/draft-todo-yourname-protocol-latest/${i%.md}-latest/g" "$i"
git add "$i"
done
if [ -n "$(git status --porcelain draft-*)" ]; then
git commit -m "Update draft labels" draft-*
fi

- name: "Cleanup"
run: |
git rm -rf .github/workflows/setup.yml README.md
git commit -m "Remove setup files"

- name: "Clone the i-d-template Repo"
run: |
git clone --depth=1 https://github.com/martinthomson/i-d-template lib

- name: "Run i-d-template Setup"
uses: martinthomson/i-d-template@v1
with:
make: setup

- name: "Fix Lint"
uses: martinthomson/i-d-template@v1
with:
make: fix-lint

- name: "Update Venue Information"
uses: martinthomson/i-d-template@v1
with:
make: update-venue

- name: "Push Changes"
run: |
git push
19 changes: 4 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-x86_64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
ffi (1.17.2)
forwardable-extended (2.6.0)
google-protobuf (4.31.0-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.31.0-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.31.0-x86_64-linux-gnu)
google-protobuf (4.31.0)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
Expand Down Expand Up @@ -65,12 +57,9 @@ GEM
rexml (3.4.1)
rouge (4.5.2)
safe_yaml (1.0.5)
sass-embedded (1.89.0-arm64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.89.0-x86_64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.89.0-x86_64-linux-gnu)
sass-embedded (1.89.1)
google-protobuf (~> 4.31)
rake (>= 13)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
Expand Down
2 changes: 2 additions & 0 deletions _data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ items:
url: '/validator/'
- label: 'On the web'
url: '/on_the_web/'
- label: 'Internet Draft'
url: '/rfc/draft-jsonlines-standard-mime-type.html'
- label: 'json.org'
url: 'https://json.org'
73 changes: 73 additions & 0 deletions rfc/draft-jsonlines-standard-mime-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
layout: default
title: Internet Draft
---
title: "application/jsonl Standard MIME type"

category: info

docname: draft-todo-yourname-protocol-latest
submissiontype: IETF # also: "independent", "editorial", "IAB", or "IRTF"
number:
date:
consensus: true
v: 3
area: AREA
workgroup: WG Working Group
keyword:
- next generation
- unicorn
- sparkling distributed ledger
venue:
group: WG
type: Working Group
mail: [email protected]
arch: https://example.com/WG
github: USER/REPO
latest: https://example.com/LATEST

author:
-
fullname: Your Name Here
organization: Your Organization Here
email: [email protected]

normative:

informative:

...

--- abstract

TODO Abstract


--- middle

# Introduction

TODO Introduction


# Conventions and Definitions

{::boilerplate bcp14-tagged}


# Security Considerations

TODO Security


# IANA Considerations

This document has no IANA actions.


--- back

# Acknowledgments
{:numbered="false"}

TODO acknowledge.