diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index 0a7a95d..197eb5a 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -42,10 +42,10 @@ jobs: GH_TOKEN: ${{ github.token }} run: | echo "Filtering Issues with Label Migration To ProxmoxVE" - raw_output=$(gh issue list --json title,labels) + raw_output=$(gh issue list --json title,labels,number) echo "$raw_output" - filtered_issues=$(echo "$raw_output" | jq -r '.[] | select(.labels[]?.name == "Migration To ProxmoxVE") | .title') + filtered_issues=$(echo "$raw_output" | jq -r '.[] | select(.labels[]?.name == "Migration To ProxmoxVE") | .title' | head -n 1) issue_nr=$(echo "$raw_output" | jq -r '.[] | select(.labels[]?.name == "Migration To ProxmoxVE") | .number' | head -n 1) echo $raw_output echo $filtered_issues @@ -157,3 +157,6 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh issue comment ${{ steps.list_issues.outputs.issue_nr }} --body "A PR has been created for ${{ steps.list_issues.outputs.script_name }}: community-scripts/ProxmoxVE#${{ steps.create_pull_request.outputs.pr_number }}" + //remove label "Migration To ProxmoxVE" + gh issue label remove ${{ steps.list_issues.outputs.issue_nr }} "Migration To ProxmoxVE" + gh issue label add ${{ steps.list_issues.outputs.issue_nr }} "Started Migration To ProxmoxVE"