Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
453 stars 141 forks source link

Spoon: Watch for meeting #228

Open asp55 opened 3 years ago

asp55 commented 3 years ago

Submitting WatchForMeeting.spoon, which monitors for active zoom.us calls, and can share that information to a web page (that can in turn be run on a tablet outside the room to let others know you're busy.)

asp55 commented 3 years ago

Is PR / build failing because of this warning:

WARN: SIGNATURE/PARAMETER COUNT MISMATCH: 'WatchForMeeting:fake(mic_open, video_on, sharing)' says 3 parameters ('mic_open, video_on, sharing'), but Parameters section has 0 entries:

Not sure I understand why it's getting that warning...

My documentation has those 3 parameters spelled out:

--- WatchForMeeting:fake(mic_open, video_on, sharing)
--- Method
--- Disables monitoring and reports as being in a meeting. 
--- Useful when meeting type is not supported (currently any platform that isn't zoom.)
---
--- Parameters:
--- * mic_open: Boolean
--- * video_on: Boolean
--- * sharing: Boolean
---
--- Returns:
---  * The spoon.WatchForMeeting object

And they seem to all be there in docs.json

asp55 commented 3 years ago

Never mind, that was exactly why it was failing. Seems like that check is very picky about the formatting. Had to rewrite parameters as

--- Parameters:
---  * mic_open - A boolean indicating if the mic is open
---  * video_on - A boolean indicating if the video camera is on
---  * sharing - A boolean indicating if screen sharing is on

And now we're passing.

cmsj commented 3 years ago

@asp55 sorry it’s so picky. I’m going to look into having the docstring checker leave specific comments on the PR to show where the problems are. Might make it easier for people to deal with.

asp55 commented 3 years ago

@cmsj No problem, I eventually got it.

Though I'm not entirely sure what I fixed to clear the first set of warnings that claimed this about all my methods...

WARN: SIGNATURE/PARAMETER COUNT MISMATCH: 'WatchForMeeting:start()' says 1 parameters (''), but Parameters section has 0 entries:

asp55 commented 3 years ago

I don't think this check is failing because of something in my code. Or am I missing something?

Failing check: Publish Docstring Annotations

1
Run yuzutech/annotations-action@v0.3.0
8
Creating check {owner: 'Hammerspoon', repo: 'Spoons', name: Docstrings linter}
9
Error: GitHubApiUnauthorizedError: Unable to create a check, please make sure that the provided 'repo-token' has write permissions to 'Hammerspoon/Spoons' - cause: HttpError: Resource not accessible by integration
cmsj commented 2 years ago

@asp55 If you rebase this on top of current master in this repo, you should get proper feedback from the docstrings linter.

asp55 commented 2 years ago

@cmsj yep, seems to be working now.

asp55 commented 1 year ago

Added a few new features to this spoon.

asp55 commented 7 months ago

Hi, checking in if this pull request is being considered.

cmsj commented 3 months ago

@asp55 apologies for the heinous delay in look at this. Looks like there's one docstrings nit to take care of, and then this can merge.