Skip to content

Handling a change in the payload URL from CircleCI app#93

Merged
larsoner merged 31 commits intoscientific-python:masterfrom
DavidT3:master
Mar 2, 2026
Merged

Handling a change in the payload URL from CircleCI app#93
larsoner merged 31 commits intoscientific-python:masterfrom
DavidT3:master

Conversation

@DavidT3
Copy link
Copy Markdown
Contributor

@DavidT3 DavidT3 commented Feb 23, 2026

A couple of weeks ago the format of the 'target_url' retrieved from the GitHub triggering event changed from the https://app.circleci.com/pipelines/circleci/... format, to a https://app.circleci.com/workflow/... format.

That was incompatible with the if statement used to decide how to construct the URL for retrieving artifacts.

I altered the if statement so that it would take the same approach for 'https://app.circleci.com/workflow/...' as it did/does for https://app.circleci.com/pipelines/circleci/...

Fixes the problems I was having in a project using this action, tested using my fork.

DavidT3 and others added 28 commits September 16, 2025 16:07
Removed header with credential info from step 1 fetch
…with a workflow that contains multiple jobs.
Made changes to the action to support workflows with multiple jobs
Added logging for the entire payload to assist with debugging.
Log entire payload for debugging purposes
Updated logging to display payload keys instead of the entire payload for improved debugging.
Change payload logging to show only keys
Added comments to clarify the purpose of reading the 'state' from the payload.
Enhance comments for payload state handling
Added comment to detail the other type of GitHub app URL.
@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Feb 23, 2026

Could you please rebase on top of the default branch from here, this commit history is a bit confusing. Thanks!

@bsipocz bsipocz added the bug Something isn't working label Feb 23, 2026
Copy link
Copy Markdown
Collaborator

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsipocz I'm okay with (committing my spacing fix and) squash-and-merging this one so the commit history gets simplified down to a single commit. Okay for you?

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Feb 27, 2026

@bsipocz I'm okay with (committing my spacing fix and) squash-and-merging this one so the commit history gets simplified down to a single commit. Okay for you?

Sure, but hopefully the PR then has somewhat clean history, here it's not exactly clear to me from which commit the actual changes are coming from.
(Overall I think the issue is that the PR is not opened from a feature branch -- and getting used to the feature-branch-on-a-fork workflow would be beneficial for other projects, too where David and I collaborate ;) )

dist/index.js Outdated
let artifacts_url = '';
const target = payload.target_url.split('?')[0]; // strip any ?utm=…
if (target.includes('/pipelines/circleci/')) {
if (target.includes('/pipelines/circleci/') || target.includes('app.circleci.com/workflow/')) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (target.includes('/pipelines/circleci/') || target.includes('app.circleci.com/workflow/')) {
if (target.includes('/pipelines/circleci/') || target.includes('app.circleci.com/workflow/')) {

@larsoner
Copy link
Copy Markdown
Collaborator

larsoner commented Mar 2, 2026

Sure, but hopefully the PR then has somewhat clean history, here it's not exactly clear to me from which commit the actual changes are coming from.

In the end with the squash-and-merge approach the only commit in our main history will be a single one with the diff that's currently viewable on GitHub and looks okay. So I'll go ahead and merge this one

@larsoner larsoner merged commit 3e58112 into scientific-python:master Mar 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants