Repository navigation
Automate GitHub repo setup - #148
Merged
Merged
Conversation
Rename: - `bug_report.md` > `bug.md` - `feature_request.md` > `feature.md` Add templates for chore, debugging, enhancement, performance, refactor and research issues (matching type label included). The template names mirror the issue label; templates exists both in the root and generated project.
If the user is not logged in to `gh`, the script 1. prompts for a PAT when no login exists 2. logs in `gh auth login --with-token` 3. registers `gh` as the git credential helper. If credentials already exist, the script does not do anything.
The script embedded a PAT in the remote URL, i.e., exposing the secret in plain text. Now, the script relies on `.gh_auth.sh` to use a credential-free HTTPS remote and authenticate with `gh`'s credential helper.
The script 1. creates or edits issue labels to match the labels for which issue templates exist 2. deletes additional labels by default; retains labels when passing `--keep-extra-labels` 3. prints a before/after diff on the labels `hooks/post_gen_project.py` chmods the new script to 0755.
The script allows creating a GitHub repo, set the remote and sync labels Optionally create the GitHub repo with --create, private by default and public via --public, then set the remote (`.set_gh_remote.sh`) and sync labels (`.sync_gh_labels.sh`). Note: - creating the repo is optional, i.e., the script works with existing repos. - `hooks/post_gen_project.py` chmods the new script to 0755.
Move the status on a project board of every issue a PR closes: - "In review": the PR is marked ready for review or opened directly as ready-for-review. - "Ready": the PR is closed unmerged. The workflow requires two credentials: `GITHUB_TOKEN` to look up issues, and `PROJECTS_TOKEN` to access the GitHub project. The `PROJECT_NUMBER` variable points to the project.
`gh repo create` returns before GitHub finishes provisioning a new repo's default labels. Syncing immediately made `gh label create` collide with `wontfix`, the alphabetically last default, aborting the bootstrap under `set -e`. Poll the label count after creation until it stops changing. A count of zero on timeout is harmless, since there is nothing to collide with, so the wait warns and continues rather than failing.
- refer to project README for steps after generation - fix the commands for updating generated projects
Update the repo setup section to reflect the latest changes.
- remove redundant bold highlight - Update setup section to refer to the README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Bug fixes
New
chore,debugging,enhancement,performance,refactor,researchRelated issues
Closes #145.