Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Sep 10, 2024
1 parent 2260d22 commit fe1fe4c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/add-to-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Is Longhorn Member
uses: tspascoal/get-user-teams-membership@v1.0.4
uses: tspascoal/get-user-teams-membership@v3.0.0
id: is-longhorn-member
with:
username: ${{ github.event.issue.user.login }}
organization: longhorn
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
continue-on-error: true
- name: Add To Community Project
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
if: steps.is-longhorn-member.outcome == 'success' && fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/orgs/longhorn/projects/5
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
id: add-project
- name: Update Item Fields for issues
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'labeled') && fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
if: github.event_name == 'issues' && steps.is-longhorn-member.outcome == 'success' && (github.event.action == 'opened' || github.event.action == 'labeled') && fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
uses: titoportas/update-project-fields@v0.1.0
with:
project-url: https://github.com/orgs/longhorn/projects/5
Expand All @@ -33,7 +34,7 @@ jobs:
field-keys: Status,Sprint
field-values: "New,[0]"
- name: Update Item Fields for issue_comment
if: github.event_name == 'issue_comment' && (github.event.action == 'created' || github.event.action == 'edited') && fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
if: github.event_name == 'issue_comment' && steps.is-longhorn-member.outcome == 'success'&& (github.event.action == 'created' || github.event.action == 'edited') && fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
uses: titoportas/update-project-fields@v0.1.0
with:
project-url: https://github.com/orgs/longhorn/projects/5
Expand All @@ -53,7 +54,7 @@ jobs:
organization: longhorn
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- name: Add To QA & DevOps Project
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] != null
if: steps.is-longhorn-member.outcome == 'success' && fromJSON(steps.is-longhorn-member.outputs.teams)[0] != null
uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/orgs/longhorn/projects/4
Expand Down

0 comments on commit fe1fe4c

Please sign in to comment.