Skip to content

IONOS(build): refactor job URL extraction with safer string handling and reusable action#186

Merged
printminion-co merged 2 commits intomk/dev/jfrog_add_workflow_infofrom
copilot/sub-pr-184
Jan 15, 2026
Merged

IONOS(build): refactor job URL extraction with safer string handling and reusable action#186
printminion-co merged 2 commits intomk/dev/jfrog_add_workflow_infofrom
copilot/sub-pr-184

Conversation

Copy link

Copilot AI commented Jan 15, 2026

Summary

Refactors the GitHub Actions job URL extraction logic to handle special characters safely and eliminates code duplication through a reusable composite action.

Job Name String Handling:

  • Replaced inline string interpolation in jq filters with --arg parameter for safer string comparison
  • Prevents potential failures when job names contain special characters requiring escaping

Code Consolidation:

  • Extracted 28 lines of duplicated API request logic into .github/actions/get-job-url/action.yml
  • Both build-external-apps and Push to artifactory jobs now use the composite action
  • Single source of truth for error handling and job URL fetching

Before:

JOB_URL=$(echo "$RESPONSE_BODY" | jq -r '.jobs[] | select(.name == "build-external-apps (${{ matrix.app_info.name }})") | .html_url')

After:

- uses: ./.github/actions/get-job-url
  with:
    job-name: 'build-external-apps (${{ matrix.app_info.name }})'
    github-token: ${{ github.token }}
    repository: ${{ github.repository }}
    run-id: ${{ github.run_id }}

TODO

  • Test composite action behavior in CI run

Checklist


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: printminion-co <145785698+printminion-co@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow info to improve artifact upload process IONOS(build): refactor job URL extraction with safer string handling and reusable action Jan 15, 2026
Copilot AI requested a review from printminion-co January 15, 2026 16:26
@printminion-co printminion-co marked this pull request as ready for review January 15, 2026 16:26
@printminion-co printminion-co merged commit 1c6a2be into mk/dev/jfrog_add_workflow_info Jan 15, 2026
1 check failed
@printminion-co printminion-co deleted the copilot/sub-pr-184 branch January 15, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants