Skip to content

feat(ci): add github action for creating issues on sdk repos on major/minor spec version updates#31

Open
mkurapov wants to merge 8 commits into
mainfrom
max/rop-54
Open

feat(ci): add github action for creating issues on sdk repos on major/minor spec version updates#31
mkurapov wants to merge 8 commits into
mainfrom
max/rop-54

Conversation

@mkurapov

@mkurapov mkurapov commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Context

This PR adds an action to create an "Update to Open Payments Specification" issue for the Node, PHP, Go, Java, .NET and Rust SDKs on every minor (or major) version change of the specification. Example issue: interledger/open-payments-node#30

It also creates a summary issue in open-payments to track all of the SDK update issues, example: interledger/open-payments#810

@mkurapov mkurapov marked this pull request as ready for review June 12, 2026 13:13
body,
headers: {
'X-GitHub-Api-Version': '2026-03-10'
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

- [ ] Review the changes in the latest specification
- [ ] Update the SDK to maintain feature compatibility
- [ ] Release a new version of the SDK
- [ ] If applicable, add or update SDK snippets in the Open Payments documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@melissahenderson should I add more context to this todo item?

@mkurapov mkurapov force-pushed the max/rop-54 branch 2 times, most recently from f6d12e3 to 99c9a35 Compare June 12, 2026 14:56

@BlairCurrey BlairCurrey left a comment

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.

some small things

Comment thread .github/workflows/sdk-repo-notifier.yaml
- name: Check version
id: check-version
run: |
tag_name="${{ github.event.release.tag_name }}"

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.

pass github.event.release.tag_name in instead? and steps.check-version.outputs.version below

It's highly recommended to not evaluate expressions directly in the script to avoid script injections and potential SyntaxErrors when the expression is not valid JavaScript code (particularly when it comes to improperly escaped strings).

https://github.com/actions/github-script#passing-inputs-to-the-script

In reality, I think this is very defensive. As I understand it one of the maintainers would need to publish a bad/malicious release tag.

}
});
} catch (error) {
core.error(`Failed to create summary issue in interledger/open-payments: ${error.message}`);

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 think core.error will not fail the job, judging by the docs: https://github.com/actions/toolkit/tree/main/packages/core

Suggested change
core.error(`Failed to create summary issue in interledger/open-payments: ${error.message}`);
core.setFailed(`Failed to create summary issue in interledger/open-payments: ${error.message}`);

${createdIssueUrls.map(issueUrl => `- [ ] ${issueUrl}`).join('\n')}

---
*This issue was automatically created by the SDK Repo Notifier workflow.*`.replace(/^\s+/gm, '');

@BlairCurrey BlairCurrey Jun 12, 2026

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.

this is removing all the spaces between lines. Do we want that? I think gh markdown is friendly to that but I dont think all flavors are (idk about linear)

const body = `## SDK Update Status

    This issue tracks the SDK updates.

    ### Issues

    - [ ] item one
    - [ ] item two

    ---
    *footer*`;

console.log(body.replace(/^\s+/gm, ''));

Giving:

## SDK Update Status
This issue tracks the SDK updates for the new version of the specifications: [v1.3.0](https://example.com/releases/v1.3.0).
### Issues
- [ ] https://github.com/interledger/open-payments-node/issues/30
- [ ] https://github.com/interledger/open-payments-rust/issues/12
---
*This issue was automatically created by the SDK Repo Notifier workflow.*

.replace(/^[ \t]+/gm, '') is preserving it and removing space/tab whitespace.

Maybe not that important unless we start to see problems though.

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.

Anyway to make this idempotent so we dont create duplicate issues on retry? Before create lookup all issue by title and see if it exists?

IDK if there are any race conditions as well. This workflow running twice at once, both see issue doesnt exist, both create one. Not sure how we'd lock and I guess that part is probably super edge-casey. Retry seems more plausible though.

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