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

error when running as github action #174

Open
matthewmayer opened this issue May 18, 2020 · 8 comments
Open

error when running as github action #174

matthewmayer opened this issue May 18, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@matthewmayer
Copy link

src/index.ts:52:48 - error TS2339: Property 'issues' does not exist on type 'GitHubAPI'.

52             const issue = await context.github.issues.get(context.issue({
                                                  ~~~~~~

src/index.ts:55:57 - error TS7006: Parameter 'label' implicitly has an 'any' type.

55             const currentLabels = issue.data.labels.map(label => label.name)
                                                           ~~~~~

src/index.ts:81:34 - error TS2339: Property 'issues' does not exist on type 'GitHubAPI'.

81             await context.github.issues.addLabels(context.issue({
                                    ~~~~~~
@Logerfo
Copy link
Owner

Logerfo commented May 18, 2020

What branch/tag/commit did you use as target?

@matthewmayer
Copy link
Author

logerfo/[email protected]

@matthewmayer
Copy link
Author

My whole YML looks like this

name: Close-label
on:
- pull_request

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: logerfo/[email protected]
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}

@Logerfo
Copy link
Owner

Logerfo commented May 22, 2020

Hmm I think it won't work unless I distribute the transpiled js, like I've done for non-probot actions like gitflow-action (the release branch). This may also be relevant.
I have published several working actions, but this one is the only based on probot because it was not intended to be an action, since it was done before actions actually exist.
The official server is still running as the original purpose and anyone can use it. If you don't feel secure using my hosted version, also feel free to fork my project and host it yourself.
In the meanwhile, I don't know when I'll have time to take a better look at this, but I'd gladly merge a PR fixing it (or do the job myself if I had some confirmation that distributing the js will solve the issue completely by itself) if it's of anyone's interest.
Thank you for reporting.

@Logerfo Logerfo added the bug Something isn't working label May 22, 2020
@matthewmayer
Copy link
Author

So just to clarify if I follow the steps for

Using the bot as a GitHub app

Install the app through the GitHub Marketplace.

It should work?

@Logerfo
Copy link
Owner

Logerfo commented May 23, 2020

Yes.

@Lissy93
Copy link

Lissy93 commented Oct 5, 2021

Hiya, love your action idea, was looking for exactly this! Nice work :)
But I'm getting exactly the same issue as above, when running as an action, using my own bot.

For refence, here is my workflow file which produces this result, and here are the full logs.

It also looks like a lot of the dependencies are very out-of-date, as several deprecation warnings and security advisories were thrown. Is this action still maintained? If not, it should probably be removed from the marketplace.

@Logerfo
Copy link
Owner

Logerfo commented Oct 5, 2021

@Lissy93 I'm open to review and merge any pull requests, but I'm not working on this project myself. As this is not running as a web application, I don't think security advisories from dependencies should be an issue. Regardless, I remember configuring "renovate" bot to update dependencies automatically.
If you issue a pull request fixing the bug or updating any problematic dependency, I'll be glad to merge it.

RebeccaStevens added a commit to RebeccaStevens/close-label that referenced this issue Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants