I have an Github Bot (Probot) that I use to handle automation for things like naming conventions etc etc.
I also have a number of teams that we use for controlling visibility and I was wondering if it's possible to use the Probot to assign certain teams access when a Repo is created from a particular template.
However I have analysed the context object and searched through it looking for the template repo name but cant seem to find a solid way of determining where the repo was created from. Maybe I'm missing something here or is this not possible at all? See code attached
const templateTeamAssignment = async (context) => {
const { github, payload } = context;
const repo = payload.repository.name;
console.log("context", context);
};
module.exports = templateTeamAssignment;
Any ideas?