Skip to content

Fix triggering workflows - #13

Open
dscho wants to merge 2 commits into
mainfrom
fix-triggering-workflows
Open

dscho wants to merge 2 commits into
mainfrom
fix-triggering-workflows

Conversation

@dscho

@dscho dscho commented Dec 1, 2026

Copy link
Copy Markdown
Member

I just tried to trigger a workflow in a sister GitHub App, and it failed.

Turns out that the API advanced in a way that is incompatible with what we started using. Let's fix that, and while at it, no longer just use the latest API version but instead pin it.

This is a companion of git-for-windows/gfw-helper-github-app#267.

This used to be needed to get _some_ information back, but now it no
longer works:

	"return_run_details" is not an object

Seems that the newest API version silently dropped this flag.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
dscho force-pushed the fix-triggering-workflows branch from 8a730bf to c068ec7 Compare December 1, 2026 14:12
@dscho

dscho commented Dec 1, 2026 •

Copy link
Copy Markdown
Member Author

Funnily enough, this slash command worked... even before merging this PR...

We just got surprised with a failure due to an update in the API
version: When triggering workflows, the `return_run_details` flag, which
used to be required, now triggers an error.

Let's avoid getting such nasty surprises by specifying which API version
we target.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
dscho force-pushed the fix-triggering-workflows branch from c068ec7 to 36fbbff Compare December 1, 2026 14:42
body,
{
Authorization: `Bearer ${token}`,
'X-GitHub-Api-Version': '2026-03-10',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know this is only used in two places but could it be environment controlled? An env var could set the supported api version without a code change. Would that require more changes when a level set is needed?

Since the api change has been addressed, is version locking needed? Should we wait for the next break given the api usage is so basic?

This branch has not been deployed

No deployments
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