Skip to content

Commit

Permalink
ci: run extended array based on the person who open the PR (#3256)
Browse files Browse the repository at this point in the history
* testing: adding printing message

* chore: adding changelog file 3256.added.md

* ci: check type of event, and using pull request opener if it is a pull request.

* chore: adding changelog file 3256.added.md

* chore: clean up messages

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
germa89 and pyansys-ci-bot authored Jul 10, 2024
1 parent 9047d71 commit 0578613
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,25 @@ jobs:
- name: "Install Git and checkout project"
uses: actions/[email protected]

- name: Get event type and user to check permissions.
id: get_user
env:
type_event: ${{ github.event.issue.pull_request }}
run: |
if [[ $type_event ]]; then
echo "Event type: $type_event"
echo "event_type=$( echo "$type_event" )" >> $GITHUB_OUTPUT
export user=${{ github.event.pull_request.user.login }}
else
export user=${{ github.actor }}
fi
echo "This PR has been opened by: $user"
echo "user=$( echo "$user" )" >> $GITHUB_OUTPUT
- uses: tspascoal/get-user-teams-membership@v3
id: is_organization_member
with:
username: ${{ github.actor }}
username: ${{ steps.get_user.outputs.user }}
organization: ansys
team: 'pymapdl-developers'
GITHUB_TOKEN: ${{ secrets.TOKEN_TEAMS_USER_READ }}
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/3256.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: run extended array based on the person who open the PR

0 comments on commit 0578613

Please sign in to comment.