profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/gr2m/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Gregor Martynus gr2m @octokit @probot @nock @semantic-release @AllContributors Los Angeles https://dev.to/gr2m Community Engineer 🔧🤓🌈✨

actions/toolkit 2626

The GitHub ToolKit for developing GitHub Actions.

drwpow/openapi-typescript 1035

Generate TypeScript types from Swagger OpenAPI specs

github/rest-api-description 847

An OpenAPI description for GitHub's REST API

espy/ubersicht 244

A dashboard for recent activity on all of a user's or organisation's repos

calvinmetcalf/crypto-pouch 213

plugin for encrypted pouchdb/couchdb databases

gr2m/appcache-nanny 213

Auto Updates for Offline First Applications

espy/hoodie-plugin-tutorial 20

A detailed walkthrough of the plugin writing process

cutenode/nodekitten 6

NodeKitten, The GitHub Actions Edition

push eventgr2m/javascript-plugin-architecture-with-typescript-definitions

Gregor Martynus

commit sha d6b6a6a01dd45619566efa0955f89f8e3fcfdcbe

feat: `RestApiClient` example (#68)

view details

push time in 31 minutes

delete branch gr2m/javascript-plugin-architecture-with-typescript-definitions

delete branch : rest-api-client-example

delete time in 31 minutes

PR merged gr2m/javascript-plugin-architecture-with-typescript-definitions

feat: `RestApiClient` example

This pull request currently fails because I don't know how to export a RestApiClient class type that is extending Base and has both the plugins and defaults implemented.

The JS code is simple enough

import { Base } from "../../index.js";

import { requestPlugin } from "./request-plugin.js";

export const RestApiClient = Base
  .withPlugins([requestPlugin])
  .withDefaults({ userAgent: "rest-api-client/1.0.0" });

But I'm not clear how to define the type declarations so that an import of RestApiClient would set the .request() instance method as well as RestApiClient.defaults

I think ideally I'd like to do something like this?

import { Base } from "javascript-plugin-architecture-with-typescript-definitions";
import { requestPlugin } from "./request-plugin.js"

type Defaults = {
  userAgent: string
}

export class RestApiClient extends Base<Defaults, [requestPlugin]> {}

But I'm not sure how that would work

import { Base } from "javascript-plugin-architecture-with-typescript-definitions";

export class RestApiClient extends Base.withDefaults({
  userAgent: "rest-api-client/1.0.0"
}) {}

RestApiClient.defaults.userAgent // string

When I try the TypeScript code above in this TypeScript playground then the resulting .D.TS code is quite complex.

So two things I want to figure out

  1. How to create a .d.ts file for a new class with custom defaults and plugins based on Base
  2. How to make step 1 as simple as possible
+261 -6

1 comment

10 changed files

gr2m

pr closed time in 31 minutes

push eventgr2m/javascript-plugin-architecture-with-typescript-definitions

Josh Goldberg

commit sha 1ae82cade3f1a706fb628c877a2216efbb4aef83

feat(typescript): `ExtendBaseWith` Generic type (#69)

view details

push time in 34 minutes

delete branch gr2m/javascript-plugin-architecture-with-typescript-definitions

delete branch : rest-api-extend-base-with

delete time in 34 minutes

PR merged gr2m/javascript-plugin-architecture-with-typescript-definitions

Added ExtendBaseWith type for Rest API example

ExtendsBaseWith applies defaults and/or plugins from its type parameter onto a created type.

I'm not positive I got exactly where to put those types right, so this might be a little off. More test cases should be added if so!

+127 -11

2 comments

5 changed files

JoshuaKGoldberg

pr closed time in 34 minutes

PullRequestReviewEvent

push eventgr2m/javascript-plugin-architecture-with-typescript-definitions

Gregor Martynus

commit sha fe27cf391fd999c099be2811b483407afbd3474b

docs(README): TypeScript for a customized Base class

view details

push time in 35 minutes

issue closedoctokit/oauth-app.js

Is this package going to work after Github's sunsetting?

Specifically, I am talking about https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/ I am considering using this package but unsure due to the confusing message regarding deprecation of using clientId + clientSecret, which is similar to the main example of:

const app = new OAuthApp({
  clientType: "oauth-app",
  clientId: "1234567890abcdef1234",
  clientSecret: "1234567890abcdef1234567890abcdef12345678",
});

closed time in 43 minutes

GiladFeder

issue commentoctokit/oauth-app.js

Is this package going to work after Github's sunsetting?

Yes, this package is not affected by GitHub's sunsetting of the query parameters because we send the credentials in the Authorization header.

GiladFeder

comment created time in 43 minutes

issue commentoctokit/request-error.js

Deprecation messages

Hmm the error will go away once we release a breaking version. But if you like we could check if error.code is a number between 100 and 599, and only log the deprecation message in that case? I'd accept a pull request if you are up to it

gingermusketeer

comment created time in an hour

issue commentoctokit/graphql.js

Pagination/Next Cursor Automation

Okay, @gr2m I should now have some time to start this (sorry for taking sooo long)

yay! And no worries

is there a place maybe where we (any anyone else who is interested) could map out what we would like v1 to be, because I really don't think it is going to cover EVERY use case. Also, I don't think this issue is the right place for that discussion, but maybe a link could be posted within this chat.

I think this issue here as well as the pull request at https://github.com/octokit/plugin-paginate-graphql.js/pull/1 had plenty of discussion. I'd say the scope is set by now. Let's not supported nested paginations, and let's implement the suggestion with cursor variable names mapping to the query paths, as in the last two paragraphs here:

https://github.com/octokit/graphql.js/issues/61#issuecomment-643392492

So if the query is

query($cursor_repository_stargazers:String) { 
  repository(name:"probot", owner:"probot") {
    stargazers(first: 100, after:$cursor_repository_stargazers) {
      pageInfo {
        endCursor
        hasNextPage
      }
      nodes {
        login
        company
      }
    }
  }
}

Then the method should be

octokit.graphqlPaginate(query)

And the cursor for cursor_repository_stargazers should be read out and set automatically for subsequent requests. If the pageInfo was not part of the query then we should throw an error instead of trying to inject it.

I would suggest we don't do any alterations to the query, even though we would load the same data for nodes outside of the node that are being paginated.

I hope that GitHub will introduce a root query node specific to pagination which would make this all much easier, but I didn't have the time to lobby much for that. I'd say once we have the simple and naive implementation I described above, I can make the point that it's wasteful and implementing nested pagination would be close to impossible without having a new query root element that is made explicitly for pagination

NickLiffen

comment created time in an hour

pull request commentryanblock/lambda-shell-commands

replace `@octokit/rest` v16 with latest `@octokit/core`

so @octokit/core is only providing a bare minimum method with great types to send REST API requests using octokit.request(), with all its benefits and limitations.

Creating a commit with multiple file changes is not that trivial, it requires multiple REST API requests. For use cases like this there we have plugins.

For example, I created a plugin to create a pull request which does support changing multiple files with a single commit: https://github.com/gr2m/create-or-update-pull-request-action

I wanted to extract the logic for the commit out of the pull request logic, but didn't get to it yet, but there is a community plugin for that: https://github.com/mheap/octokit-commit-multiple-files

Does either work for you?

gr2m

comment created time in an hour

issue commentprobot/probot

Expiration time' claim ('exp') is too far in the future

I still have this in my backlog

m-czernek

comment created time in 2 hours

delete branch gr2m/lambda-shell-commands

delete branch : replace-octokit-rest-with-octokit-core

delete time in 2 hours

pull request commentryanblock/lambda-shell-commands

replace `@octokit/rest` v16 with latest `@octokit/core`

should I still use @octokit/core @gr2m?

Yes 👍🏼

Looks like you figured it all out? Let me know if you have any further questions

gr2m

comment created time in 2 hours

issue closedoctokit/graphql.js

missing fields in PackageVersion

Hello,

The REST Api allow to retrieve dates for a package version:

  • created_at
  • updated_at

I'm wondering if these fields can be implemented in PackageVersion graph.

closed time in 2 hours

tcastelly

issue commentoctokit/graphql.js

missing fields in PackageVersion

Hi @tcastelly, this is the wrong place to ask I'm afraid. This repository is just a JavaScript method to send queries to GitHubs GraphQL API. I recommend to contact support at https://support.github.com/contact or to create a post in the GitHub API forum at https://github.community/c/github-ecosystem/37

tcastelly

comment created time in 2 hours

push eventoctokit/openapi

Octokit Bot

commit sha e59437a6a674e49191d00da414e91227727b1925

docs: update link to support in descriptions (#135)

view details

push time in 2 hours

PR merged octokit/openapi

docs: update link to support in descriptions maintenance

I found new changes in GitHub's official OpenAPI specifications and thought I'd let you know about it 👋🤖

I can't tell if the changes include fixes, features, breaking changes or just cache updates, you'll have to figure that out on yourself and adapt the commit messages accordingly to trigger the right release, see our commit message conventions.

+94 -94

0 comment

36 changed files

octokitbot

pr closed time in 2 hours

delete branch octokit/openapi

delete branch : update

delete time in 2 hours

PullRequestReviewEvent

issue commentgithub/rest-api-description

[Schema Inaccuracy] `owner` property in the `full-repository` schema should not be nullable

I created a follow up issue about the referenced simple-user schema, which still has nullable: true https://github.com/github/rest-api-description/issues/486

wolfy1339

comment created time in 2 hours

issue openedstefanbuck/github-issue-parser

JSON output parsed as `{}`

See this action run. It logs the full event payload and has debugging enabled:

https://github.com/gr2m/helpdesk/runs/3255305558?check_suite_focus=true

I seems as if the values are parsed as part of the title? Maybe the problem is that the line breaks are \r\ns instead of just \ns?

image

created time in 2 hours

issue openedstefanbuck/github-issue-parser

Values are all lowercased

Hi Stefan!

I use your action for my automation at https://github.com/gr2m/helpdesk and made another show about it: https://github.com/gr2m/helpdesk/issues/42

One problem I realized is that all values seem to be lowercased. Is that intentional?

created time in 2 hours

issue openedgr2m/helpdesk

DO NOT EDIT - Await parsing by GitHub Actions

Title of the show

Issue Forms part III

What type of show will it be

automating helpdesk

Date of the show

2021-08-12

Time when the show starts

10:00

Guests

No response

Show URL

https://www.twitch.tv/gregorcodes

Tags

automation

Summary

3rd and (hopefully) final part about the issue form automation. See the first two episodse

  • https://github.com/gr2m/helpdesk/issues/34
  • https://github.com/gr2m/helpdesk/issues/42

Outline

tbd

Preparations

No response

created time in 2 hours

issue closedgr2m/helpdesk

DO NOT EDIT - Await parsing by GitHub Actions

Title of the show

Issue Forms part III

What type of show will it be

automating helpdesk

Date of the show

2021-08-12

Time when the show starts

10:00

Guests

No response

Show URL

https://www.twitch.tv/gregorcodes

Tags

automation

Summary

3rd and (hopefully) final part about the issue form automation. See the first two episodse

  • https://github.com/gr2m/helpdesk/issues/34
  • https://github.com/gr2m/helpdesk/issues/42

Outline

tbd

Preparations

No response

closed time in 2 hours

gr2m

push eventgr2m/gr2m

Gregor Martynus

commit sha 3c4a6de85657b1dab92b4d250853b17780f26c7c

docs(README): update helpdesk shows

view details

push time in 2 hours

push eventgr2m/helpdesk

Gregor Martynus

commit sha 9be8d93610540c4a3660576614a0923af78af29e

docs(README): update helpdesk shows

view details

push time in 2 hours

issue commentgr2m/helpdesk

📅 8/5 @ 10am PT - Automating gr2m/helpdesk: issue forms part II

Show is done for today, thank you all! Recording is coming up in a moment

gr2m

comment created time in 2 hours