Skip to content

Commit 1bc0427

Browse files
authored
Merge pull request #12 from mnot/fixup
thanks a lot, @mnot!
2 parents 06bf629 + 2dac6e5 commit 1bc0427

File tree

13 files changed

+365
-46
lines changed

13 files changed

+365
-46
lines changed

.circleci/config.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: martinthomson/i-d-template:latest
6+
resource_class: small
7+
working_directory: ~/draft
8+
9+
steps:
10+
- run:
11+
name: "Print Configuration"
12+
command: |
13+
xml2rfc --version
14+
gem list -q kramdown-rfc
15+
echo -n 'mmark '; mmark --version
16+
17+
- restore_cache:
18+
name: "Restoring cache - Git"
19+
keys:
20+
- v2-cache-git-{{ .Branch }}-{{ .Revision }}
21+
- v2-cache-git-{{ .Branch }}
22+
- v2-cache-git-
23+
24+
- restore_cache:
25+
name: "Restoring cache - References"
26+
keys:
27+
- v1-cache-references-{{ epoch }}
28+
- v1-cache-references-
29+
30+
# Workaround for https://discuss.circleci.com/t/22437
31+
- run:
32+
name: Tag Checkout
33+
command: |
34+
if [ -n "$CIRCLE_TAG" ] && [ -d .git ]; then
35+
remote=$(echo "$CIRCLE_REPOSITORY_URL" | \
36+
sed -e 's,/^git.github.com:,https://github.com/,')
37+
git fetch -f "$remote" "refs/tags/$CIRCLE_TAG:refs/tags/$CIRCLE_TAG" || \
38+
(echo 'Removing .git cache for tag build'; rm -rf .git)
39+
fi
40+
41+
- checkout
42+
43+
# Build txt and html versions of drafts
44+
- run:
45+
name: "Build Drafts"
46+
command: make
47+
48+
# Update editor's copy on gh-pages
49+
- run:
50+
name: "Update GitHub Pages"
51+
command: |
52+
if [ "${CIRCLE_TAG#draft-}" == "$CIRCLE_TAG" ]; then
53+
make gh-pages
54+
fi
55+
56+
# For tagged builds, upload to the datatracker.
57+
- deploy:
58+
name: "Upload to Datatracker"
59+
command: |
60+
if [ "${CIRCLE_TAG#draft-}" != "$CIRCLE_TAG" ]; then
61+
make upload
62+
fi
63+
64+
# Archive GitHub Issues
65+
- run:
66+
name: "Archive GitHub Issues"
67+
command: "make archive || make archive DISABLE_ARCHIVE_FETCH=true && make gh-archive"
68+
69+
# Create and store artifacts
70+
- run:
71+
name: "Create Artifacts"
72+
command: "make artifacts CI_ARTIFACTS=/tmp/artifacts"
73+
74+
- store_artifacts:
75+
path: /tmp/artifacts
76+
77+
- run:
78+
name: "Prepare for Caching"
79+
command: "git reflog expire --expire=now --all && git gc --prune=now"
80+
81+
- save_cache:
82+
name: "Saving Cache - Git"
83+
key: v2-cache-git-{{ .Branch }}-{{ .Revision }}
84+
paths:
85+
- ~/draft/.git
86+
87+
- save_cache:
88+
name: "Saving Cache - Drafts"
89+
key: v1-cache-references-{{ epoch }}
90+
paths:
91+
- ~/.cache/xml2rfc
92+
93+
94+
workflows:
95+
version: 2
96+
build:
97+
jobs:
98+
- build:
99+
filters:
100+
tags:
101+
only: /.*?/

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See http://editorconfig.org
2+
3+
root = true
4+
5+
[*.{md,xml,org}]
6+
charset = utf-8
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Automatically generated CODEOWNERS
2+
# Regenerate with `make update-codeowners`
3+
draft-ietf-httpapi-idempotency-key-header.md [email protected] [email protected] [email protected]

.github/workflows/archive.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Archive Issues and Pull Requests"
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0,2,4'
6+
repository_dispatch:
7+
types: [archive]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: "Archive Issues and Pull Requests"
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: "Checkout"
16+
uses: actions/checkout@v2
17+
18+
- name: "Update Archive"
19+
uses: martinthomson/i-d-template@v1
20+
with:
21+
make: archive
22+
token: ${{ github.token }}
23+
24+
- name: "Update GitHub Pages"
25+
uses: martinthomson/i-d-template@v1
26+
with:
27+
make: gh-archive
28+
token: ${{ github.token }}
29+
30+
- name: "Save Archive"
31+
uses: actions/upload-artifact@v2
32+
with:
33+
path: archive.json

.github/workflows/ghpages.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Update Editor's Copy"
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- README.md
7+
- CONTRIBUTING.md
8+
- LICENSE.md
9+
- .gitignore
10+
pull_request:
11+
paths-ignore:
12+
- README.md
13+
- CONTRIBUTING.md
14+
- LICENSE.md
15+
- .gitignore
16+
17+
jobs:
18+
build:
19+
name: "Update Editor's Copy"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: "Checkout"
23+
uses: actions/checkout@v2
24+
25+
- name: "Cache Setup"
26+
id: cache-setup
27+
run: |
28+
mkdir -p "$HOME"/.cache/xml2rfc
29+
echo "::set-output name=path::$HOME/.cache/xml2rfc"
30+
date -u "+::set-output name=date::%FT%T"
31+
32+
- name: "Cache References"
33+
uses: actions/cache@v2
34+
with:
35+
path: |
36+
${{ steps.cache-setup.outputs.path }}
37+
.targets.mk
38+
key: refcache-${{ steps.cache-setup.outputs.date }}
39+
restore-keys: |
40+
refcache-${{ steps.cache-setup.outputs.date }}
41+
refcache-
42+
43+
- name: "Build Drafts"
44+
uses: martinthomson/i-d-template@v1
45+
with:
46+
token: ${{ github.token }}
47+
48+
- name: "Update GitHub Pages"
49+
uses: martinthomson/i-d-template@v1
50+
if: ${{ github.event_name == 'push' }}
51+
with:
52+
make: gh-pages
53+
token: ${{ github.token }}
54+
55+
- name: "Archive Built Drafts"
56+
uses: actions/upload-artifact@v2
57+
with:
58+
path: |
59+
draft-*.html
60+
draft-*.txt

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Publish New Draft Version"
2+
3+
on:
4+
push:
5+
tags:
6+
- "draft-*"
7+
8+
jobs:
9+
build:
10+
name: "Publish New Draft Version"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Checkout"
14+
uses: actions/checkout@v2
15+
16+
# See https://github.com/actions/checkout/issues/290
17+
- name: "Get Tag Annotations"
18+
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
19+
20+
- name: "Cache Setup"
21+
id: cache-setup
22+
run: |
23+
mkdir -p "$HOME"/.cache/xml2rfc
24+
echo "::set-output name=path::$HOME/.cache/xml2rfc"
25+
date -u "+::set-output name=date::%FT%T"
26+
27+
- name: "Cache References"
28+
uses: actions/cache@v2
29+
with:
30+
path: |
31+
${{ steps.cache-setup.outputs.path }}
32+
.targets.mk
33+
key: refcache-${{ steps.date.outputs.date }}
34+
restore-keys: |
35+
refcache-${{ steps.date.outputs.date }}
36+
refcache-
37+
38+
- name: "Build Drafts"
39+
uses: martinthomson/i-d-template@v1
40+
with:
41+
token: ${{ github.token }}
42+
43+
- name: "Upload to Datatracker"
44+
uses: martinthomson/i-d-template@v1
45+
with:
46+
make: upload
47+
48+
- name: "Archive Submitted Drafts"
49+
uses: actions/upload-artifact@v2
50+
with:
51+
path: "draft-*-[0-9][0-9].xml"

.github/workflows/update.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Update Generated Files"
2+
# This rule is not run automatically.
3+
# It can be run manually to update all of the files that are part
4+
# of the template, specifically:
5+
# - README.md
6+
# - CONTRIBUTING.md
7+
# - .note.xml
8+
# - .github/CODEOWNERS
9+
# - Makefile
10+
#
11+
#
12+
# This might be useful if you have:
13+
# - added, removed, or renamed drafts (including after adoption)
14+
# - added, removed, or changed draft editors
15+
# - changed the title of drafts
16+
#
17+
# Note that this removes any customizations you have made to
18+
# the affected files.
19+
on: workflow_dispatch
20+
21+
jobs:
22+
build:
23+
name: "Update Files"
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: "Checkout"
27+
uses: actions/checkout@v2
28+
29+
- name: "Update Generated Files"
30+
uses: martinthomson/i-d-template@v1
31+
with:
32+
make: update-files
33+
token: ${{ github.token }}
34+
35+
- name: "Push Update"
36+
run: git push

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.html
2+
*.pdf
3+
*.redxml
4+
*.swp
5+
*.txt
6+
*.upload
7+
*~
8+
.refcache
9+
.tags
10+
.targets.mk
11+
/*-[0-9][0-9].xml
12+
archive.json
13+
draft-ietf-httpapi-idempotency-key-header.xml
14+
lib
15+
report.xml
16+
venv/

.note.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<note title="Discussion Venues" removeInRFC="true">
2+
<t>Discussion of this document takes place on the
3+
Building Blocks for HTTP APIs Working Group mailing list ([email protected]),
4+
which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/httpapi/"/>.</t>
5+
<t>Source for this draft and an issue tracker can be found at
6+
<eref target="https://github.com/mnot/idempotency"/>.</t>
7+
</note>

CONTRIBUTING.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,24 @@ property policies of IETF currently designated as
99
[IETF Trust Legal Provisions (TLP) Relating to IETF Documents](http://trustee.ietf.org/trust-legal-provisions.html).
1010

1111
Any edit, commit, pull request, issue, comment or other change made to this
12-
repository is considered to be a "Contribution to the IETF Standards Process"
12+
repository constitutes Contributions to the IETF Standards Process
1313
(https://www.ietf.org/).
1414

1515
You agree to comply with all applicable IETF policies and procedures, including,
1616
BCP 78, 79, the TLP, and the TLP rules regarding code components (e.g. being
1717
subject to a Simplified BSD License) in Contributions.
1818

19+
## Working Group Information
1920

20-
## Other Resources
21+
Discussion of this work occurs on the [Building Blocks for HTTP APIs
22+
Working Group mailing list](mailto:[email protected])
23+
([archive](https://mailarchive.ietf.org/arch/browse/httpapi/),
24+
[subscribe](https://www.ietf.org/mailman/listinfo/httpapi)).
25+
In addition to contributions in GitHub, you are encouraged to participate in
26+
discussions there.
2127

22-
Discussion of this work occurs on the
23-
[HTTPAPI working group mailing list](https://mailarchive.ietf.org/arch/browse/httpapi/)
24-
([subscribe](https://www.ietf.org/mailman/listinfo/httpapi)). In addition to
25-
contributions on GitHub, you are encouraged to participate in discussions there.
28+
**Note**: Some working groups adopt a policy whereby substantive discussion of
29+
technical issues needs to occur on the mailing list.
2630

2731
You might also like to familiarize yourself with other
28-
[working group documents](https://datatracker.ietf.org/wg/httpapi/documents/).
32+
[Working Group documents](https://datatracker.ietf.org/wg/httpapi/documents/).

0 commit comments

Comments
 (0)