Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a config prop 'aggressiveFollowUps' to follow up based on p… #39

Merged

Conversation

ishowvel
Copy link
Contributor

Resolves #26

@ishowvel
Copy link
Contributor Author

qa is in progress, please wait patiently

@ishowvel
Copy link
Contributor Author

image
does anyone else get this error?
github is refusing to get my action released to marketplace
is there any other way to qa this?

@0x4007
Copy link
Member

0x4007 commented Oct 27, 2024

You sure you need to publish it to use it?

@Keyrxng
Copy link
Contributor

Keyrxng commented Oct 27, 2024

You shouldn't have to create a release for this or even your kernel app.

To QA a plugin:

  1. run the kernel locally
  2. enter this config into your .ubiquity-os configuration repo.
- plugins: 
  - uses:
    - plugin: http:localhost:4000
      with:
        ...plugginSettingsForThisplugin
  1. run yarn worker inside the plugin repo if it's a worker-friendly plugin.
  2. If it's an action plugin, you need to push your changes to the repo and instead of localhost:4000 you use your repo name so keyrxng/my-forked-plugin-repo:compute.yml@development "compute.yml" is our workflow entry do not alter this part, "@dev" is whatever branch you are working on.
  3. Trigger a github webhook event which manifest.json lists for the plugin and you should see the kernel catch the event in your terminal logs and then it passes it to localhost:4000 directly to the plugin.

hope this helps

@ishowvel
Copy link
Contributor Author

development
what may plugin github token be?
i couldnt find it in the readme nor in the compute yaml file

@gentlementlegen
Copy link
Member

development what may plugin github token be? i couldnt find it in the readme nor in the compute yaml file

@whilefoo RFC I think you can use GITHUB_TOKEN there.

@ishowvel
Copy link
Contributor Author

development what may plugin github token be? i couldnt find it in the readme nor in the compute yaml file

@whilefoo RFC I think you can use GITHUB_TOKEN there.

It doesn't exist in the codebase as far as I know, it only exists in the polyfill in the dist dorectory

@ishowvel
Copy link
Contributor Author

@gentlementlegen instead of qa's, can adding exhaustive tests be a good and acceptable alternative?

@gentlementlegen
Copy link
Member

Both should be required. What is blocking you?

@ishowvel
Copy link
Contributor Author

i have tried again and again to make this plugin work
heres the error this time

TransformDecodeError: Invalid event [review_requested] (unknown event)
    at decode_Default (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:295144)
    at decode_FromArray (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:295232)
    at decode_Visit (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:297642)
    at decode_FromObject (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:296096)
    at decode_Visit (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:297782)
    at TransformDecode (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:298149)
    at Decode (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:305653)
    at createActionsPlugin (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:473956) {
  schema: {
    default: [
      'pull_request.review_requested',
      'pull_request.ready_for_review',
      'pull_request_review_comment.created',
      'issue_comment.created',
      'push'
    ],
    type: 'array',
    items: { type: 'string', [Symbol(TypeBox.Kind)]: 'String' },
    [Symbol(TypeBox.Kind)]: 'Array',
    [Symbol(TypeBox.Transform)]: { Decode: [Function (anonymous)], Encode: [Function (anonymous)] }
  },
  path: '/eventWhitelist',
  value: [ 'review_requested', 'ready_for_review', 'commented', 'committed' ],
  error: TypeBoxError: Invalid event [review_requested] (unknown event)
      at Object.Decode (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:570096)
      at decode_Default (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:295117)
      at decode_FromArray (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:295232)
      at decode_Visit (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:297642)
      at decode_FromObject (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:296096)
      at decode_Visit (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:297782)
      at TransformDecode (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:298149)
      at Decode (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:305653)
      at createActionsPlugin (file:///home/runner/work/daemon-disqualifier/daemon-disqualifier/dist/index.js:3:473956)
}

and heres the workflow run

@whilefoo
Copy link
Contributor

whilefoo commented Oct 29, 2024

This error originates from your Typebox Decode function.

The values you supplied in the config are: [ 'review_requested', 'ready_for_review', 'commented', 'committed' ],
but your Decode function is trying searching within eventWhitelist which has [ "pull_request.review_requested", "pull_request.ready_for_review", "pull_request_review_comment.created", "issue_comment.created", "push"] so it doesn't find it.

Could you elaborate why you need to map these event names?

@ishowvel
Copy link
Contributor Author

This error originates from your Typebox Decode function.

The values you supplied in the config are: [ 'review_requested', 'ready_for_review', 'commented', 'committed' ],
but your Decode function is trying searching within eventWhitelist which has [ "pull_request.review_requested", "pull_request.ready_for_review", "pull_request_review_comment.created", "issue_comment.created", "push"] so it doesn't find it.

Could you elaborate why you need to map these event names?

I did figure that much, the thing is this isn't my piece of code. This piece of code is making it absolute hell for me

@Keyrxng
Copy link
Contributor

Keyrxng commented Oct 29, 2024

@ishowvel You need to pass in the full webhook name "pull_request.ready_for_review" which then gets mapped to it's short name in relation to the timeline.

This fn takes values from this object which contain the full webhook name. This map.get(webhook) passes in the full webhook and the Map returns the short name.

This is where the schema is validated and rejected if incorrect.

value: [ 'review_requested', 'ready_for_review', 'commented', 'committed' ],

Your TypeBox error is telling you the value that you've placed at the path /eventWhitelist which indicates that what you are passing in there doesn't match.

default: [
'pull_request.review_requested',
'pull_request.ready_for_review',
'pull_request_review_comment.created',
'issue_comment.created',
'push'
],

This is showing you the default values according to the schema had you not passed anything in via the config, these would be used instead.

hope this helps

@ishowvel
Copy link
Contributor Author

Why are the short names in the valid configuration of this repository, shouldn't the valid configuration contain the full names of the events?

@Keyrxng
Copy link
Contributor

Keyrxng commented Oct 29, 2024

@ishowvel Nice catch that's slipped through without being updated, yes you're right they should be updated I thought I remembered updating docs for that part, my mistake dude.

@ishowvel
Copy link
Contributor Author

https://github.com/ishowvel/daemon-disqualifier/actions/runs/11602651701/job/32308069382
heres the qa, i added logging to show the normal warning and disqualification time vs the time it would take if prioritySpeed was enabled as you can see in the logs

@gentlementlegen
Copy link
Member

gentlementlegen commented Oct 31, 2024

@ishowvel Could you please remove the comma here so it doesn't break the URL?

Also please update the README with the newly added configuration value.

@ishowvel
Copy link
Contributor Author

Done!

Copy link
Member

@gentlementlegen gentlementlegen left a comment

Choose a reason for hiding this comment

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

Please resolve the conflicts and good to go.

@ishowvel
Copy link
Contributor Author

ishowvel commented Nov 2, 2024

Please resolve the conflicts and good to go.

Resolved!

@gentlementlegen gentlementlegen merged commit 7815ea7 into ubiquity-os-marketplace:development Nov 2, 2024
2 checks passed
@ubiquity-os-beta ubiquity-os-beta bot mentioned this pull request Nov 2, 2024
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.

Priority Speed
5 participants