Skip to content

migrate github_user_gpg_key to context-aware CRUD functions#3330

Closed
texasich wants to merge 1 commit intointegrations:mainfrom
texasich:maint/migrate-user-gpg-key-context-crud
Closed

migrate github_user_gpg_key to context-aware CRUD functions#3330
texasich wants to merge 1 commit intointegrations:mainfrom
texasich:maint/migrate-user-gpg-key-context-crud

Conversation

@texasich
Copy link
Copy Markdown

Closes #2996

Migrates resource_github_user_gpg_key from the deprecated non-context-aware SDK signatures to CreateContext/ReadContext/DeleteContext, updating return types from error to diag.Diagnostics throughout.

Changes:

  • Create/Read/Delete ? CreateContext/ReadContext/DeleteContext in the resource struct
  • All CRUD function signatures updated to accept ctx context.Context and return diag.Diagnostics
  • Removed inline context.Background() and context.WithValue() calls (ctx now flows in from the SDK)
  • All return err ? return diag.FromErr(err)

Built and go vet ./... clean.

Switch Create/Read/Delete to CreateContext/ReadContext/DeleteContext
and update function signatures to accept ctx and return diag.Diagnostics.
Removes inline context.Background() and context.WithValue() calls that
are now redundant since ctx flows in from the SDK.

Part of integrations#2996.
@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@github-actions github-actions bot added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label Apr 10, 2026
@texasich
Copy link
Copy Markdown
Author

Closing this to stay within the 1-open-PR-per-new-contributor rule -- stacked three PRs on top of #3325 in the same day without realizing. Will reopen once #3325 merges. The work is sitting on my fork if anyone wants to cherry-pick it in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MAINT] Migrate all resources and data sources to Context-aware CRUD functions

1 participant