Skip to content

Easier app certificate request - #1975

Draft
lukasdotcom wants to merge 5 commits into
masterfrom
easier-app-release
Draft

lukasdotcom wants to merge 5 commits into
masterfrom
easier-app-release

Conversation

@lukasdotcom

Copy link
Copy Markdown
Member

Form to create app certificate request
image

  • Needs docs still

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

lukasdotcom and others added 4 commits November 10, 2026 14:46
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
@lukasdotcom lukasdotcom added this to the v5.1.0 milestone Nov 16, 2026

@edward-ly edward-ly left a comment •

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.

Nice, the key/CSR generation works for me, along with the automatic PR (nextcloud/app-certificate-requests#1478)! A few more notes on top of the other comments:

  • The form needs more validations:
    • cap app_id length to 32 characters
    • check that the CSR's CN and app_id actually match
    • check if the app_id is already taken by another app or not
  • When creating the PR, check that the branch name is also not already taken
  • PR commit is missing DCO

Comment on lines +70 to +72
<button type="button" id="generate-key-cert" class="btn btn-default">
{% trans 'Generate key and CSR' %}
</button>

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.

This button needs a different color to not blend in with the background. Maybe it would look better centered too.

Comment thread nextcloudappstore/api/v1/views.py Outdated
Comment on lines +253 to +254
if not settings.GITHUB_API_TOKEN:
raise ValidationError("Certificate request submission is not configured")

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.

I'd say this is some kind of server-side error more than a ValidationError, since it's not the user's fault in this case.

app_id = serializer.validated_data["app_id"]
repository = serializer.validated_data["repository"]
csr = serializer.validated_data["csr"].strip()
client = GitHubClient(settings.GITHUB_API_BASE_URL, settings.GITHUB_API_TOKEN)

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.

Maybe we should use a separate GITHUB_APP_CERTIFICATE_TOKEN with write permissions for creating PRs since GITHUB_API_TOKEN only needs read access at the moment.

@lukasdotcom
lukasdotcom force-pushed the easier-app-release branch 2 times, most recently from c5291aa to d030e1f Compare November 24, 2026 16:07
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>

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