github issue template propagation from .github repo not working - github-issues

I have created yml based github issue templates in a repo in my organization. They work as expected.
However, when I put these into the organizations .github repo, they neither work as templates for that repo nor do they show up as templates on repositories in the organization that don't have issue templates.
What might I be doing wrong? Does anyone have this working that I could look at?
I initially tried this with markdown, so switched over to yml issue templates. That change didn't seem to make a difference.
I got the impression that a config.yml might be needed, so I added the config.yml to add other methods of commenting. The config.yml does work in a normal repository, but seems to do nothing in the .github repo.

Related

Can I automatically create a label on a github repo?

Our organisation stores code on github and there are certain ways-of-working that we want new repos created by our team to adhere to (e.g. there is a default set of workflows at .github/workflows that each repo should have, a basic .gitignore, linter config files in .github, etc..). Hence we have built repo templates that people can instantiate using a tool called cookiecutter. Its working really well. Note though that cookiecutter only automates the creation of content, it doesn't actually create the git repo (i.e. it doesn't run git init) and it doesn't create anything on github. Hence, the workflow for someone to use one of our templates is:
cookiecutter --output-dir new-repo-name https://github.com/our-org/our-template-repo
cd new-repo-name
git init
gh repo create new-repo-name --private --source=. --remote=upstream
git add .
git push
Hopefully you get the idea.
We then had an idea that we would like to be able to track all the github repos that get created from our templates. We thought a nice way of doing that would be to ensure that each of those repos had a certain label on them.
Hence I'd like to be able to automatically create labels on such newly created repos. Does anyone know a way of doing that? (I was hoping there was perhaps a way of achieving it by putting a certain file into the .github directory, but alas it seems there is no such thing.)
The only labels that come to my mind are the classic GitHub Labels for issues and pull requests. You can also create them with the GitHub CLI. In your case you could add something like gh label create template --description "Created with template xyz" --color 348AA7 to your script. Let me know if this was helpful.

Adding GitHub Team and Repo Admins to Repos Created From Template

I have a couple questions related to GitHub template repositories. My team regularly creates repositories from a GitHub template repository. We also have a GitHub team and like to add all of our repositories to our team.
My questions are:
Anytime a new repository is created from our template repository, how can it be automatically added to our GitHub team's list of repositories?
Anytime a new repository is created from our template repository, how can myself (and someone else) automatically be made admins of this new repository (even if we didn't create the repository)?
I've searched all over documentation and Stack Overflow for possible solutions but came up empty handed. I've looked into using CODEOWNER files which might be useful, but don't look like they're designed for this use case. I've also looked into creating new repositories from the GitHub CLI using the template repository and maybe a shell script to add it to our GitHub team, but was hoping for a simpler solution.
Thanks for any thoughts or suggestions!

Automatically update GitHub wiki based on repository markdown files

I'm fairly new to GitHub and I've been trying to get the GitHub Wiki associated with a project to get the content from the main repository with no success.
Online there are guides on how to do this on Microsoft Azure here, but for some reason, I cannot find anything similar for GitHub. I am not sure where to ask this question so I came to the trusted StackOverflow community.
Basically I have a repository where we are uploading a series of markdown documents (see giovannellilab/protocols) and I would like the content of the wiki for the same project to be updated with pages coming from the repository. Each markdown file in the repository becomes its own wiki page. Ideally, the wiki will get automatically updated every time we push something new to the repo or we merge a new pull request.
So far I have not found an easy to implement a solution.
I've also tried to use a GitHub Action found in the marketplace, SwiftDocOrg with no success. I'm new to GitHub-actions and even follwing the guide I could not make this work.
Here the content of my .yml page:
- name: Publish to GitHub Wiki
uses: SwiftDocOrg/github-wiki-publish-action#1.0.0
with:
# A path to the directory of files to publish
path: giovannellilab/protocols
The action is failing each time (obviously something is wrong/missing, but I cannot figure out what).
Any suggestions on how to make it work in GitHub?
Any other place where I can host documentation pulling directly from a GitHub repository?
Any other better way to implement this?
Thank you very much,
Don

Per-repo github pages work, but main github pages don't

I used github pages for a project and it worked fine:
The gh-pages branch of a repo lets me load it's contents just fine
However, now I want to use the main per-person github pages it doesn't seem to want to work:
https://github.com/jnvsor/jnvsor.github.io should lead to http://jnvsor.github.io/ but while apgtk branch gh-pages works fine the jnvsor.github.io repository isn't working at all.
What's wrong?
github.io crashes building a page if the submodule uses an ssh url. Apparently they don't support it. Changing my .gitmodules to use https fixed the problem

Using Github pages with Jekyll in a subdirectory

I recently wanted to publish my Jekyll site on Github pages, but it seems that putting everything in a subdirectory is giving some issues, even after I change the source to the correct directory.
My structure looks like this:
- site
- src (contains all Jekyll stuff)
- README.md
- GruntFile.js
- ...
Locally my site builds perfectly and when I go to http://localhost:4040 I can see it just nicely, but when I commit this to my Github and visit username.github.io I get a 404, if I go to username.github.io/src I can see part of my site, however all {% include %} are ignored.
In my _config.yml I updated the source: source: ./src, but that doesn't seem to help.
Is there a way to make Github Pages handle subdirectories properly? Basically I want to tell it that my Jekyll site is inside /src, and I want the url to just be username.github.io instead of username.github.io/src
I know i can use the pages branch and commit to there, but I would prefer if it could happen automaticly.
If it helps anyone, I attempted to run Jekyll on GH Pages from a subdir (and modified source) and was banging my head against the wall over these errors:
A file was included in subdir/index.html that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/articles/page-build-failed-file-is-a-symlink.
After much searching on this, the definitive answer was right there in the docs:
Configuration Overrides
We override the following _config.yml values, which you are unable to
configure:
safe: true
lsi: false
source: your top-level directory
Keep in mind that if you change the source setting, your pages may not
build correctly. GitHub Pages only considers source files in the
top-level directory of a repository.
I contact Github support and they gave me 2 solutions.
Move all my Jekyll source files to my top-lever directory.
Use a different branch and update it manually each time.