Skip to content

Conversation

@segiddins
Copy link
Contributor

Will be used for CLI workflow to add trusted publishing to a gem, since we dont want the resulting API key that can manage trusted publishing to be long-lived

@codecov
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.09%. Comparing base (066aae5) to head (de23d50).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4681   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files         392      392           
  Lines        8273     8275    +2     
=======================================
+ Hits         8033     8035    +2     
  Misses        240      240           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@segiddins segiddins force-pushed the segiddins/wip-allow-creating-api-keys-with-an-expiration-date branch from 050c66b to 56c4397 Compare May 7, 2024 06:05
Copy link
Contributor

@martinemde martinemde left a comment

Choose a reason for hiding this comment

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

Looking good so far.

@segiddins segiddins force-pushed the segiddins/wip-allow-creating-api-keys-with-an-expiration-date branch 2 times, most recently from 264b4ba to 4275747 Compare May 7, 2024 17:04
@segiddins segiddins changed the title [WIP] Allow creating API keys with an expiration date Allow creating API keys with an expiration date May 7, 2024
@segiddins segiddins marked this pull request as ready for review May 7, 2024 17:15
@martinemde martinemde force-pushed the segiddins/wip-allow-creating-api-keys-with-an-expiration-date branch from 4275747 to 5159c36 Compare May 7, 2024 17:57
Will be used for CLI workflow to add trusted publishing to a gem, since we dont want the resulting API key that can manage trusted publishing to be long-lived
@segiddins segiddins force-pushed the segiddins/wip-allow-creating-api-keys-with-an-expiration-date branch from 5159c36 to de23d50 Compare May 7, 2024 18:11
@segiddins segiddins merged commit e4a0d90 into master May 7, 2024
@segiddins segiddins deleted the segiddins/wip-allow-creating-api-keys-with-an-expiration-date branch May 7, 2024 19:51
<%= form_with model: [:profile, @api_key], data: { controller: "exclusive-checkbox gem-scope" } do |f| %>
<%= label_tag :name, t("api_keys.index.name"), class: "form__label" %>
<%= f.text_field :name, class: "form__input", autocomplete: :off %>
<%= f.text_field :name, class: "form__input", autocomplete: :off, disabled: f.object.persisted? %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is name "readonly" once created? Is that enforced also on server side somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, enforced in the controllers and there are tests for that

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking again, it seems covered by controller. Is that enough? What about model validation?

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.

4 participants