Skip to content

Commit

Permalink
Try custom script
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Sep 12, 2023
1 parent fc3295d commit d6156c9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/check_author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@ jobs:
name: Check author
runs-on: ubuntu-20.04
steps:
- name: Check email
run: echo "This PR is opened by ${{ github.event.pull_request.user.email }}."
- uses: actions/github-script@v6
with:
script: |
// If user is member of my_team team do nothing else do something
// See: https://octokit.github.io/rest.js/v18#teams
const creator = context.payload.sender.login
const result = await github.rest.teams.getMembershipForUserInOrg({
org: context.repo.owner,
team_slug: 'my-cool-team',
username: creator
})
console.log(creator, result) // do whatever you want

0 comments on commit d6156c9

Please sign in to comment.