Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf7b7e3

Browse files
committed
.github/workflows/traiage.yaml: add push step
1 parentf0b42b9 commitdf7b7e3

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

‎.github/workflows/traiage.yaml‎

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ on:
77
description:'GitHub Issue URL to process'
88
required:true
99
type:string
10-
context_key:
11-
description:'Unique context key (defaults to issue number)'
12-
required:true
13-
type:string
1410
template_name:
1511
description:'Coder template to use for workspace'
1612
required:true
1713
default:'ai-workspace'
1814
type:string
15+
prefix:
16+
description:'Prefix for workspace name'
17+
required:false
18+
default:'triage'
19+
type:string
1920

2021

2122
jobs:
@@ -33,11 +34,19 @@ jobs:
3334
uses:actions/checkout@v4
3435

3536
# NOTE: Only required for local testing via nektos/act
36-
# - name: Install gh CLI
37-
# run: |
38-
# sudo apt-get update -y && \
39-
# sudo apt-get install -y gh && \
40-
# gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
37+
-name:Install gh CLI
38+
run:|
39+
sudo apt-get update -y && \
40+
sudo apt-get install -y gh && \
41+
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
42+
43+
-name:Extract context key from issue
44+
id:extract-context
45+
run:|
46+
issue_number=$(gh issue view "${{ inputs.issue_url }}" --json number --jq '.number')
47+
context_key="gh-${issue_number}"
48+
echo "context_key=${context_key}" >> $GITHUB_OUTPUT
49+
echo "CONTEXT_KEY=${context_key}" >> $GITHUB_ENV
4150
4251
-name:Download and install Coder binary
4352
shell:bash
@@ -59,7 +68,7 @@ jobs:
5968
-name:Create Coder workspace
6069
id:create-workspace
6170
run:|
62-
export WORKSPACE_NAME="gh-issue-${{ inputs.context_key }}-${{ github.run_id }}"
71+
export WORKSPACE_NAME="${{ inputs.prefix }}-${{ steps.extract-context.outputs.context_key }}-${{ github.run_id }}"
6372
echo "Creating workspace: $WORKSPACE_NAME"
6473
./scripts/traiage.sh create
6574
echo "workspace_created=true" >> $GITHUB_OUTPUT
@@ -92,19 +101,25 @@ jobs:
92101
echo "WORKSPACE_NAME: ${WORKSPACE_NAME}"
93102
PROMPT=$(cat $PROMPT_FILE) ./scripts/traiage.sh prompt
94103
95-
-name:Create andupload archive
96-
id:create-archive
104+
-name:Commit andpush changes
105+
id:commit-push
97106
run:|
98-
echo "Creating archive for workspace: $WORKSPACE_NAME"
99-
archive_url=$(./scripts/traiage.sh archive)
100-
echo "archive_url=${archive_url}" >> $GITHUB_OUTPUT
107+
echo "Committing and pushing changes in workspace: $WORKSPACE_NAME"
108+
./scripts/traiage.sh commit-push
109+
110+
# - name: Create and upload archive
111+
# id: create-archive
112+
# run: |
113+
# echo "Creating archive for workspace: $WORKSPACE_NAME"
114+
# archive_url=$(./scripts/traiage.sh archive)
115+
# echo "archive_url=${archive_url}" >> $GITHUB_OUTPUT
101116

102117
-name:Report results
103118
run:|
104119
echo "## AI Triage Results" >> $GITHUB_STEP_SUMMARY
105120
echo "- **Issue URL:** ${{ inputs.issue_url }}" >> $GITHUB_STEP_SUMMARY
106121
echo "- **Context Key:** ${{ steps.extract-context.outputs.context_key }}" >> $GITHUB_STEP_SUMMARY
107-
echo "- **Workspace:** ${{ steps.extract-context.outputs.workspace_name }}" >> $GITHUB_STEP_SUMMARY
122+
echo "- **Workspace:** ${{ steps.create-workspace.outputs.workspace_name }}" >> $GITHUB_STEP_SUMMARY
108123
echo "- **Archive URL:** ${{ steps.create-archive.outputs.archive_url }}" >> $GITHUB_STEP_SUMMARY
109124
110125
-name:Cleanup workspace

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp