Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Mar 8, 2022
1 parent b3ceacf commit 0e0ebe5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,6 @@ on:
branches-ignore: [staging, production]

jobs:
# Debugging
isExpensifyEngineer:
runs-on: ubuntu-latest

steps:
- name: Check whether the actor is member of engineering team
id: checkActor
uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
username: ${{ github.actor }}
team: engineering
- name: Debug engineer
run: echo "The author is Expensify engineer - ${{ steps.checkActor.outputs.isTeamMember }}"

# Debugging
isExpensifyEmployee:
runs-on: ubuntu-latest

steps:
- name: Check whether the actor is member of expensify-expensify team
id: checkActor
uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
username: ${{ github.actor }}
team: Expensify/expensify
- name: Debug employee
run: echo "The author is Expensify employee - ${{ steps.checkActor.outputs.isTeamMember }}"

lint:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,26 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

# Check if actor is member of Expensify organization by looking for engineering team
isExpensifyEngineer:
# Check if actor is member of Expensify organization by looking for Expensify/expensify team
isExpensifyEmployee:
runs-on: ubuntu-latest

outputs:
IS_EXPENSIFY_ENGINEER: ${{ fromJSON(steps.checkActor.outputs.isTeamMember) }}
IS_EXPENSIFY_EMPLOYEE: ${{ fromJSON(steps.checkActor.outputs.isTeamMember) }}

steps:
- name: Check whether the actor is member of engineering team
- name: Check whether the actor is member of Expensify/expensify team
id: checkActor
uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
username: ${{ github.actor }}
team: engineering
team: Expensify/expensify

newContributorWelcomeMessage:
runs-on: ubuntu-latest
needs: isExpensifyEngineer
if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEngineer.outputs.IS_EXPENSIFY_ENGINEER) }}
needs: isExpensifyEmployee
if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) }}
steps:
# Version: 2.3.4
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
Expand Down

0 comments on commit 0e0ebe5

Please sign in to comment.