Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to automatically open CTS issue on spec changes #589

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

psalz
Copy link
Contributor

@psalz psalz commented Jul 22, 2024

As discussed in a recent SYCL WG call, in order to avoid having the CTS and spec go out of sync, I'm proposing to introduce a CI workflow that automatically opens an issue in the SYCL-CTS repository whenever a spec pull request opened, unless it has the editorial label upon creation.

The issue has the title "[Spec change] <title of PR>", and looks like this: KhronosGroup/SYCL-CTS#915

The message can simply be updated in the workflow file in this repository; it's relatively brief right now, let me know if you think it needs more information. I'm also assigning the author of the PR to the issue - not sure if that's something we want to do.

For future reference, here is how the whole thing is set up:

  • In order to create a new issue in another repository we need an access token. The best way I've found to generate such a token is through a GitHub app with apropriate permissions.
    • The KhronosGroup organization is the owner of the SYCL Issue Bot application, which @outofcontrol set up for me (thanks!).
    • The app only has access to the SYCL-Docs and SYCL-CTS repositories, and is only allowed to read/write issues.
  • The app itself doesn't do anything at all. Instead, it is only used to generate a temporary token through the https://github.com/actions/create-github-app-token action as part of the workflow added in this PR.
    • To do so, the action requires the app's ID as well as a secret private key, both of which are provided as GitHub action variable/secret.
  • Once the temporary token is generated, it can then be used by the Create GitHub Issue Action. Note that this is not an official GitHub action, and there are several other options available. I chose this one for its simplicity.

This adds a workflow that automatically creates a corresponding issue in
the SYCL-CTS repository whenever a pull request is opened, unless it has
the "editorial" label.
@TApplencourt
Copy link
Contributor

LGTM (and thanks for the explanation! Always nice to understand the magic :) )

@tomdeakin
Copy link
Contributor

Workflow. WG happy to merge.

@tomdeakin tomdeakin merged commit 840e3d4 into SYCL-2020/master Jul 25, 2024
4 checks passed
@psalz psalz deleted the cts-issue-automation branch August 1, 2024 08:52
keryell pushed a commit that referenced this pull request Sep 10, 2024
Add workflow to automatically open CTS issue on spec changes
gmlueck pushed a commit that referenced this pull request Nov 7, 2024
Add workflow to automatically open CTS issue on spec changes

(cherry picked from commit 840e3d4)
gmlueck pushed a commit that referenced this pull request Nov 7, 2024
Add workflow to automatically open CTS issue on spec changes

(cherry picked from commit 840e3d4)
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.

3 participants