-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Description
It will be great to add a trigger to check if the user has a membership on a team or not.
the implementation is quiet simple,
try {
const { data: { state } } = await github.teams.getMembershipForUserInOrg({
org: context.repo.owner,
team_slug: 'teamName',
username: context.actor
});
return state == 'active';
} catch (error) {
return false;
}
}
This will be awesome for not only using the trigger in combination with other triggers (for instance only trigger the action if the files included are matching and the user matches or not the team but also for triggering actions on memberships like add this label if certain user belongs or not to a team.
@cyamonide thoughts?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed