Skip to content

Commit

Permalink
Support non-GitHub hosts for note.sh generation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Jul 19, 2023
1 parent 99ea3dd commit dcaeecf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions setup-note.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash

# Usage: $0 <user> <repo> [drafts...]
# Usage: $0 github.com <user> <repo> [drafts...]

set -e

user="$1"
repo="$2"
shift 2
host="$1"
user="$2"
repo="$3"
shift 3

# Determine if the draft is a kramdown draft with a venue section.
hasvenue() {
Expand Down Expand Up @@ -56,5 +57,5 @@ if [[ -n "$wg" ]]; then
which is archived at <eref target=\"${wg_arch}\"/>.</t>"
fi
echo "<t>Source for this draft and an issue tracker can be found at
<eref target=\"https://github.com/${user}/${repo}\"/>.</t>"
<eref target=\"https://${host}/${user}/${repo}\"/>.</t>"
echo '</note>'
2 changes: 1 addition & 1 deletion setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ README.md: $(LIBDIR)/setup-readme.sh $(drafts_xml) $(filter %.md, $(TEMPLATE_FIL

.PHONY: setup-note
setup-note: $(LIBDIR)/setup-note.sh
$(LIBDIR)/setup-note.sh $(GITHUB_USER) $(GITHUB_REPO) $(drafts_source) >.note.xml
$(LIBDIR)/setup-note.sh $(GITHUB_HOST) $(GITHUB_USER) $(GITHUB_REPO) $(drafts_source) >.note.xml
if [ -s .note.xml ]; then git add .note.xml; fi

.github/CODEOWNERS: $(LIBDIR)/setup-codeowners.py $(drafts_xml) $(DEPS_FILES)
Expand Down

0 comments on commit dcaeecf

Please sign in to comment.