-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review Drafts automation #197
Comments
Also: |
Hmm it'd be better to check in the source text and let Travis generate the output if possible... That is, review-drafts/2018-05.bs gets checked in with the source as of that moment in time. We'd need some way to make it so that it doesn't get re-built every time, but only each time we add a new review draft or update some minor text inside the review draft. That seems pretty doable; we'd be able to use git to see if the file has changed. |
I guess it is indeed good to keep the source around, but we should be very clear that the source only works for generating the output for a limited time, as we might change the tooling around and I wouldn't want to have to support decade-old source files forever. How would you see Travis generating the output? It generates it and then commits it on the PR branch? And we somehow prevent that triggering another round (unless a further commit changes the source). I guess that could work with some research. We'd also need to ensure that further changes don't rejigger the date (if we really wanted to change the date we'd open a new PR). |
Agreed.
I was thinking just the same way as we do everything else: it generates it then uploads it to the server. The tricky part is just making it not do that if we haven't changed the source. But it seems doable.
Bikeshed has a Date metadata that you can set explicitly, thankfully. |
https://developer.github.com/v3/pulls/#list-pull-requests-files might therefore be a better fit. We could process such a response in bash with something akin to https://github.com/nest/nest-simulator/pull/75/files. https://stedolan.github.io/jq/manual/ has the manual for Apart from that we need some client-side instruction that copies the source and puts it in the correct directory. This probably fits in the |
(Status update: I have #200 and speced/bikeshed#1239 ready; #201 is in progress and we can both push to that as we figure things out here.) I think It's a little unclear to me whether Are you excited about working on the jq thing? Otherwise maybe do As for workflow, I have written down:
The first two steps could be put into a Makefile, indeed. |
Do they also have to change to |
Yeah, automatically passed in for any files inside the |
This took me way too long, but this is the way to get a Review Draft in bash: #!/bin/bash
set -o errexit
set -o nounset
mkdir -p "review-drafts"
INPUT="url.bs"
REVIEW_DRAFT="review-drafts/$(date +'%Y-%m').bs"
# The very unusual way of creating a newline here is done to keep macOS happy
cp "$INPUT" temp
sed 's/^Group: WHATWG$/&\'$'\n'"Date: $(date +'%Y-%m-%d')/g" temp > "$REVIEW_DRAFT"
rm temp
echo "Created Review Draft at $REVIEW_DRAFT"
echo "Differences with $INPUT:"
diff -up "$INPUT" "$REVIEW_DRAFT" I tried to figure out how to do this in a Makefile, but no luck. Okay to wrap this in a curl call as well from the Makefile and host this next to deploy.sh as review.sh? |
I'd propose we simplify Makefile as well to just:
Encouraging folks to install bikeshed and keep it up-to-date generally isn't a great use of their time. It's easier to rely on the server for the couple times you want to check something locally and not in a PR. |
(If we use this approach change the |
Yeah, Makefiles have their own weird not-quite-bash syntax. I think you can embed bash in them, but it'd be easier to just check in a script like you say. Let's remember to add that script to .gitignore. I'd like to keep the Similarly we should keep the |
It is, but |
See whatwg/whatwg.org#197 for details.
See whatwg/whatwg.org#197 for details.
See whatwg/whatwg.org#197 for details.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL and aligns the README with other READMEs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 for details.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the IRC URL.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL and aligns the README with other READMEs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests URL.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also makes various updates to align more with other WHATWG standards, notably in the README and in the addition of a Makefile.
See whatwg/whatwg.org#197 and #92 for details.
See whatwg/whatwg.org#197 and whatwg/meta#92 for details. This also updates the web-platform-tests and IRC URLs.
I looked into this a bit and one problem is that
copy_extra_files
andrun_post_build_step
only really work on Travis and not for a local deploy. Those should be part of a Review Draft however. And we can't really check in the source and let Travis generate the output since we want that to be done once and commit the output.So we could try to read
.travis.yml
locally (perhaps not that hard, even in bash?) or revamp the way we do this.The text was updated successfully, but these errors were encountered: