Adding GitHub Team and Repo Admins to Repos Created From Template - github

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!

Related

Copy all repos of an organisation to another account

I'm part of an organisation on github and would like to copy all the repos of that organisation to another regular github account at once.
I thought there would be a tool to help me to do this easily but haven't found one yet. What would be the easiest way to approach this? Thank you
I have tried looking into gh but I'm not sure it's the right tool for it. All I'm trying to do is basically cloning all the repos of the organisation I am a part of to another github account in one go
I have tried looking into gh but I'm not sure it's the right tool for it.
Considering there does not seem to be a native feature allowing for a bulk copy you want, gh is actually a good option.
Depending on the fork policy of your organization and the nature of said repositories (public or private), you should be able to write a script, using the GitHub CLI gh, which would:
list the repositories of an organization (gh repo list)
fork it (gh repo fork)
Note that will not copy issues or pull-requests.

Github: Repository > Projects vs Organization/User > Projects

My case is that I'm a member of an organization and I'm assigned to lead a project.
In my Github org, I created a Project corresponding to the project's name and my member initiated a Repository.
Inside the Repository is this:
I'm just a bit confused right now. How do you guys go about this? You have an Org>'Project' where you initially plan to organize your issues etc., and what do you do with this one?
Your organisation can have “projects” just like users, and any repository can also have “projects”. Your organisation project might list the TODOs for your organisation, but for your repository you might have a board to track issues/PRs etc specific to the repository.
Read more:
About Repository Projects
managing organisation projects

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

what is the difference between github project and project inside repository?

I know this question sounds dumb, but I am unable to understand the difference between the main project and project option provided inside each repository.
Are they same? (But the URL differs)
I looked at help.github.com
but it doesn't help.
I basically understand that for larger projects management, project inside repository is helpful.
on what uses cases, they provided the another project outside of repository and linking those repositories to it?
Is that for structuring?
There is a repository on github (sometimes called a "project") where you store your code. You change the code, make a git commit, and push those code changes to the github repository.
GitHub also has a feature called "projects" which provides you a method for managing the work that needs to be done on the code. GitHub also has "issues", an issue tracker. You can use the GitHub Project Board to organize your GitHub issues, giving you a way to see see where things are at in your effort on the code.
You can turn off the "projects" and "issues" features in the repository settings, you don't have to use them. The center of work is the code in the repository, which might be referred to as a project -- the Projects feature lets you manage your issues in GitHub in a more visual format.
The difference is in the scope. The "main project" (user-owned project board) can have issues and pull requests from multiple repositories whereas the "project in repository" (repository project board) can contain only the issues and pull requests belonging to that repository.
From the Project boards docs:
Types of project boards:
User-owned project boards can contain issues and pull requests from any personal repository.
Organization-wide project boards can contain issues and pull requests from any repository that belongs to an organization. You can link up to twenty-five repositories to your organization or user-owned project board...
Repository project boards are scoped to issues and pull requests within a single repository. They can also include notes that reference issues and pull requests in other repositories.

Sync GitHub Pages Configuration Between Projects and Organization

I have a GitHub organization where I publish a webpage from the repository orgname.github.io. Of course, I have several project repositories where I'd like to host documentation about those projects. This is all possible through GitHub Pages.
However, I'm not sure how to synchronize the configuration of the organization page with the project pages. I want the website to look the same whether I'm at
http://orgname.github.io or if I'm at http://orgname.github.io/project.
What can I do to keep the Jekyll-based configuration in sync?
This is the solution we've come up with:
Create a repository to contain the Jekyll configuration, jekyll-website.
Fork/copy the repository to the repository <orgname>.github.io.
In every project, create a git subtree as the docs directory.
Whenever you need to make change to the look/design of the webpage, do it in jekyll-website, then pull those changes into <orgname>.github.io and all the project subtrees. This is a little bit of work whenever you need to make changes to the website, but it gets the job done.
Since the Github pages sites are hosted in the gh-pages branch of their respective repos, they are independent from each other and the project pages.
I'm assuming your content will be unique for each repo, so you're asking about syncing the theme/structure etc, which as far as I know that cannot be synced. I would recommend choosing a Jekyll theme for all of your sites and stick to editing content.