Skip to content

Commit

Permalink
update owrkflwo
Browse files Browse the repository at this point in the history
  • Loading branch information
mkpro118 committed Jun 23, 2024
1 parent 6de3f91 commit d625405
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 13 additions & 5 deletions .github/workflows/close-user-story.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Add New User Story
name: Close User Story

on:
issues:
Expand Down Expand Up @@ -29,10 +29,13 @@ permissions: write-all
env:
MK_USERNAME: ${{ secrets.MK_USERNAME }}
MK_EMAIL: ${{ secrets.MK_EMAIL }}
PYTHONPATH: ${{ github.workspace }}/.github/scripts/
USER_STORY_FILE: ${{ github.workspace }}/docs/user-stories/README.md
USER_STORY_LOG_LEVEL: error
USER_STORY_SKIP_LINES: 2
USER_STORY_COMPLETE_STATUS: Completed

jobs:
add-user-story:
close-user-story:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'user-story')
steps:
Expand All @@ -55,14 +58,19 @@ jobs:
- name: Add User Story to Document
if: ${{ github.event_name == 'issues' }}
run: |
user_story --log-level debug update \
user_story --log-level $USER_STORY_LOG_LEVEL \
--file $USER_STORY_FILE \
--skip-lines $USER_STORY_SKIP_LINES \
update \
--issue-number ${{ github.event.issue.number }} \
--status "Completed" \
--status USER_STORY_COMPLETE_STATUS \
- name: Add User Story to Document (manual dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
user_story --log-level ${{ inputs.log-level }} \
--file ${{ inputs.file }} \
--skip-lines ${{ inputs.skip-lines }} \
update \
--issue-number ${{ inputs.issue_number }} \
--status ${{ inputs.status }} \
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/new-user-story.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ on:
- warning
- error
- critical
file:
description: File to read from/write to
required: false
type: string
default: "docs/user-stories/README.md"
skip-lines:
description: Number of lines to skip in the file
required: false
type: string
default: "2"
issue-number:
description: Related Issue Number
required: true
Expand All @@ -38,6 +48,10 @@ env:
MK_USERNAME: ${{ secrets.MK_USERNAME }}
MK_EMAIL: ${{ secrets.MK_EMAIL }}
PYTHONPATH: ${{ github.workspace }}/.github/scripts/
USER_STORY_FILE: ${{ github.workspace }}/docs/user-stories/README.md
USER_STORY_LOG_LEVEL: error
USER_STORY_SKIP_LINES: 2
USER_STORY_CREATE_STATUS: In-Progress

jobs:
add-user-story:
Expand All @@ -63,16 +77,21 @@ jobs:
- name: Add User Story to Document
if: ${{ github.event_name == 'issues' }}
run: |
user_story --log-level debug create \
user_story --log-level $USER_STORY_LOG_LEVEL \
--file $USER_STORY_FILE \
--skip-lines $USER_STORY_SKIP_LINES \
create \
--issue-number ${{ github.event.issue.number }} \
--url ${{ github.event.issue.html_url }} \
--status "In-Progress" \
--status $USER_STORY_CREATE_STATUS \
--content "${{ github.event.issue.body }}"
- name: Add User Story to Document (manual dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
user_story --log-level ${{ inputs.log-level }} \
--file ${{ inputs.file }} \
--skip-lines ${{ inputs.skip-lines }} \
create \
--issue-number ${{ inputs.issue_number }} \
--url ${{ inputs.issue-url }} \
Expand Down

0 comments on commit d625405

Please sign in to comment.