Skip to content

Commit

Permalink
Merge pull request #185 from TU-Wien-dataLAB/ci/project-management-en…
Browse files Browse the repository at this point in the history
…hancements

Ci/project management enhancements
  • Loading branch information
florian-jaeger committed Jan 10, 2024
2 parents b2ccb75 + 4062cbc commit cebb814
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 3 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/management_issue_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Project Management Issue Assign Actions"

on:
issues:
types:
- assigned

jobs:
send_issue_to_management_tool:
runs-on: ubuntu-latest
steps:
- name: View issue information
env:
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
NUMBER: ${{ github.event.issue.number }}
URL: ${{ github.event.issue.html_url }}
ASSIGNEE: ${{ github.event.issue.assignee.login }}
run: |
echo "Issue title: $TITLE"
echo "Issue body: $BODY"
echo "Issue number: $NUMBER"
echo "Issue url: $URL"
echo "Issue assignee: $ASSIGNEE"
- name: Send issue to GitLab CI
env:
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
run: |
curl -X POST --fail \
-F token=${{ secrets.GITLAB_CI_TRIGGER_TOKEN }} \
-F "ref=main" \
-F "variables[ACTION]=ASSIGN"
-F "variables[TITLE]=$TITLE" \
-F "variables[DESCRIPTION]=$BODY" \
-F "variables[ASSIGNEE]=$ASSIGNEE" \
-F "variables[URL]=$URL" \
-F "variables[SOURCE]=github" \
${{ secrets.GITLAB_CI_TRIGGER_URL }}
37 changes: 37 additions & 0 deletions .github/workflows/management_issue_closure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Project Management Issues Closure Actions"

on:
issues:
types:
- closed

jobs:
send_issue_to_management_tool:
runs-on: ubuntu-latest
steps:
- name: View issue information
env:
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
NUMBER: ${{ github.event.issue.number }}
URL: ${{ github.event.issue.html_url }}
run: |
echo "Issue title: $TITLE"
echo "Issue body: $BODY"
echo "Issue number: $NUMBER"
echo "Issue url: $URL"
- name: Send issue to GitLab CI
env:
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
run: |
curl -X POST --fail \
-F token=${{ secrets.GITLAB_CI_TRIGGER_TOKEN }} \
-F "ref=main" \
-F "variables[ACTION]=CLOSE"
-F "variables[TITLE]=$TITLE" \
-F "variables[DESCRIPTION]=$BODY" \
-F "variables[URL]=$URL" \
-F "variables[SOURCE]=github" \
${{ secrets.GITLAB_CI_TRIGGER_URL }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: "Project Management Actions"
name: "Project Management Issue Creation Actions"

on:
issues:
Expand All @@ -15,9 +14,13 @@ jobs:
env:
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
NUMBER: ${{ github.event.issue.number }}
URL: ${{ github.event.issue.html_url }}
run: |
echo "Issue title: $TITLE"
echo "Issue body: $BODY"
echo "Issue number: $NUMBER"
echo "Issue url: $URL"
- name: Send issue to GitLab CI
env:
Expand All @@ -27,7 +30,9 @@ jobs:
curl -X POST --fail \
-F token=${{ secrets.GITLAB_CI_TRIGGER_TOKEN }} \
-F "ref=main" \
-F "variables[ACTION]=OPEN"
-F "variables[TITLE]=$TITLE" \
-F "variables[DESCRIPTION]=$BODY" \
-F "variables[URL]=$URL" \
-F "variables[SOURCE]=github" \
${{ secrets.GITLAB_CI_TRIGGER_URL }}
${{ secrets.GITLAB_CI_TRIGGER_URL }}

0 comments on commit cebb814

Please sign in to comment.