diff --git a/.ci-scripts/release.bash b/.ci-scripts/release.bash index 160590e..e8abb17 100644 --- a/.ci-scripts/release.bash +++ b/.ci-scripts/release.bash @@ -3,7 +3,7 @@ set -o errexit set -o nounset -USERNAME="{USERNAME}" +REPO_OWNER}" REPO="{REPO}" GITHUB_USER="{GITHUB_USER}" @@ -70,7 +70,7 @@ json=$(jq -n \ echo "Uploading release notes..." -result=$(curl -X POST "https://api.github.com/repos/${USERNAME}/${REPO}/releases" \ +result=$(curl -X POST "https://api.github.com/repos/${REPO_OWNER}/${REPO}/releases" \ -H "Content-Type: application/x-www-form-urlencoded" \ -u "${GITHUB_USER}:${GITHUB_TOKEN}" \ --data "${json}") diff --git a/.ci-scripts/upload-release-documentation-to-main-actor.bash b/.ci-scripts/upload-release-documentation-to-main-actor.bash index 117399e..f4f64ab 100644 --- a/.ci-scripts/upload-release-documentation-to-main-actor.bash +++ b/.ci-scripts/upload-release-documentation-to-main-actor.bash @@ -3,7 +3,7 @@ set -eu # Needs to be supplied -USERNAME="{USERNAME}" +REPO_OWNER="{REPO_OWNER}" PACKAGE_NAME="{PACKAGE}" GITHUB_USER="{GITHUB_USER}" @@ -33,7 +33,7 @@ DOCS_DIR="${GEN_MD}/${PACKAGE_NAME}/${TAG}" # Generated markdown repo echo "Cloning main.actor-package-markdown repo into ${GEN_MD}" git clone \ - "https://${GITHUB_TOKEN}@github.com/${USERNAME}/main.actor-package-markdown.git" \ + "https://${GITHUB_TOKEN}@github.com/${REPO_OWNER}/main.actor-package-markdown.git" \ "${GEN_MD}" # Make the docs diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a49885..a88d30a 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Additional notes regarding formatting: ## Bug report -First of all please [search existing issues](https://github.com/{USERNAME}/{REPO}/issues) to make sure your issue hasn't already been reported. If you cannot find a suitable issue — [create a new one](https://github.com/{USERNAME}/{REPO}/issues/new). +First of all please [search existing issues](https://github.com/{REPO_OWNER}/{REPO}/issues) to make sure your issue hasn't already been reported. If you cannot find a suitable issue — [create a new one](https://github.com/{REPO_OWNER}/{REPO}/issues/new). Provide the following details: @@ -34,11 +34,11 @@ This project uses a fairly standard GitHub pull request workflow. If you have al Here is the basic GitHub workflow: -1. Fork this repo. you can do this via the GitHub website. This will result in you having your own copy of the repo under your GitHub account. +1. Fork this repo. you can do this via the GitHub website. This will result in you having your own copy of the repo under your GitHub account. 2. Clone your forked repo to your local machine 3. Make a branch for your change 4. Make your change on that branch -5. Push your change to your repo +5. Push your change to your repo 6. Use the github ui to open a PR Some things to note that aren't immediately obvious to folks just starting out: @@ -78,7 +78,7 @@ Documentation is not "source code." As such, it should not be wrapped at 80 colu All code examples in documentation should be formatted in a fashion appropriate to the language in question. -All command line examples in documentation should be presented in a copy and paste friendly fashion. Assume the user is using the `bash` shell. GitHub formatting on long command lines can be unfriendly to copy-and-paste. Long command lines should be broken up using `\` so that each line is no more than 80 columns. Wrapping at 80 columns should result in a good display experience in GitHub. Additionally, continuation lines should be indented two spaces. +All command line examples in documentation should be presented in a copy and paste friendly fashion. Assume the user is using the `bash` shell. GitHub formatting on long command lines can be unfriendly to copy-and-paste. Long command lines should be broken up using `\` so that each line is no more than 80 columns. Wrapping at 80 columns should result in a good display experience in GitHub. Additionally, continuation lines should be indented two spaces. OK: diff --git a/README.md b/README.md index 6840eda..de09de1 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Status -[![CircleCI](https://circleci.com/gh/{USERNAME}/{REPO}.svg?style=svg)](https://circleci.com/gh/{USERNAME}/{REPO}) +[![CircleCI](https://circleci.com/gh/{REPO_OWNER}/{REPO}.svg?style=svg)](https://circleci.com/gh/{REPO_OWNER}/{REPO}) {PROJECT_STATUS} @@ -14,9 +14,9 @@ * Update your `bundle.json` ```json -{ +{ "type": "github", - "repo": "{USERNAME}/{REPO}" + "repo": "{REPO_OWNER}/{REPO}" } ``` diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 9a45cff..63997af 100755 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -20,7 +20,7 @@ Before getting started, you will need a number for the version that you will be Please note that the release script was written with the assumption that you are using a clone of the `{REPO}` repo. You have to be using a clone rather than a fork. Further, due to how git works, you need to make sure that both your `master` branch is up-to-date. It is advised to your do this but making a fresh clone of the `{REPO}` repo from which you will release. For example: ```bash -git clone git@github.com:{USERNAME}/{REPO}.git {REPO}-release-clean +git clone git@github.com:{REPO_OWNER}/{REPO}.git {REPO}-release-clean cd {REPO}-release-clean ``` @@ -42,7 +42,7 @@ bash release.bash seantallen 9999998gk48888ddd78a9fd12345a12870987uk \ Navigate to the GitHub page for the release you just created. It will be something like: ``` -https://github.com/{USERNAME}/{REPO}/releases/tag/0.3.1 +https://github.com/{REPO_OWNER}/{REPO}/releases/tag/0.3.1 ``` Copy the url to the page. You'll need it for the next two steps. diff --git a/USAGE.md b/USAGE.md index 1d6f5f5..6729559 100755 --- a/USAGE.md +++ b/USAGE.md @@ -42,7 +42,7 @@ Additionally, the CONTRIBUTING.md assumes your project is hosted on GitHub and c This repository is templated. You'll want to replace anything in {} with the correct value. The following replacement values are required: -- {USERNAME}: your GitHub username or organization name, for example: `ponylang`. +- {REPO_OWNER}: your GitHub username or organization name, for example: `ponylang`. - {REPO}: the name of your repository, for example: `ponyc`. - {PACKAGE}: the name of your libraries package, for example: `msgpack`. - {COC_EMAIL}: email address that Code of Conduct violations should be reported to, for example: `coc@ponylang.org`. diff --git a/release.bash b/release.bash index 048d458..2342f0c 100755 --- a/release.bash +++ b/release.bash @@ -3,7 +3,7 @@ set -o errexit set -o nounset -USERNAME="{USERNAME}" +REPO_OWNER="{REPO_OWNER}" REPONAME="{REPO}" verify_args() { @@ -91,7 +91,7 @@ json=$(jq -n \ --arg body "$body" \ "${jsontemplate}") -curl -X POST "https://api.github.com/repos/${USERNAME}/${REPO}/releases" \ +curl -X POST "https://api.github.com/repos/${REPO_OWNER}/${REPO}/releases" \ -H "Content-Type: application/x-www-form-urlencoded" \ -u "${ghuser}:${ghtoken}" \ --data "${json}"