compressed-size-action
compressed-size-action copied to clipboard
Support running on [push]
As requested on Twitter and in #6, it would be nice to allow running this action on push
, in addition to the pull_request
workflow. The action should comment on the push with size deltas from its parent commit.
This may be fixable via #18, since Checks are supported for individual commits. Still need to figure out what a logical base
would be for size comparison.
I figured out a GraphQL query that can potentially be used to run on push
but get the associated PR for a given push (payload properties):
{
repository(name: "mitt", owner: "jaylinski") {
object(expression: "e5c9e1505b83fe6e35d54aa5db62aa055921bea5") {
...on Commit {
prs: associatedPullRequests(first: 1, orderBy:{field:UPDATED_AT,direction:DESC}) {
nodes {
number,
resourcePath,
isCrossRepository,
baseRefName,
mergeCommit: potentialMergeCommit { oid }
}
}
}
}
}
}
Potentially can be fixed by #35.
I updated #35 and marked it ready for review