Coder Social home page Coder Social logo

jaid / action-sync-node-meta Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 10.54 MB

GitHub Action that syncs package.json with the repository metadata.

Home Page: https://github.com/Jaid/action-sync-node-meta

License: MIT License

JavaScript 97.47% Handlebars 2.53%
action action-sync-node-meta actions bot github-action github-actions github-api metadata node node-js nodejs repository sync-node-meta util utility workflow

action-sync-node-meta's People

Contributors

actions-user avatar dword-design avatar github-actions[bot] avatar jaid avatar moltencoffee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

action-sync-node-meta's Issues

Action fails when keywords are missing (overwrite-github)

Great workflow! This is exactly what I was looking for.
One thing I noticed when trying to get this working was the fact that when there is no "keywords" field in package.json, the action fails when syncing with direction: overwrite-github
Perhaps this is intentional, but maybe the error could be a bit more verbose; Right now it will say:

HttpError: Invalid request.

"names" wasn't supplied.
    at /home/runner/work/_actions/jaid/action-sync-node-meta/v1.3.1/build/index.js:6:219539
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async R.requestGithubApi (/home/runner/work/_actions/jaid/action-sync-node-meta/v1.3.1/build/index.js:6:1057831)
    at async R.applyGithubUpdate (/home/runner/work/_actions/jaid/action-sync-node-meta/v1.3.1/build/index.js:6:1058410)
    at async /home/runner/work/_actions/jaid/action-sync-node-meta/v1.3.1/build/index.js:6:1060149

I'm not sure if this is on the part of GitHub or the workflow, but perhaps an error saying the keywords/topics are missing would be clearer.
The error, for example, given when trying uppercase letters is better:
"Topics must start with a lowercase letter or number, consist of 35 characters or less, and can include hyphens."

Keep up the good work!

commitMessagePrefix does not work

Hey, I really like this action and hope to have it integrated in my workflow soon!

Unfortunately the commitMessagePrefix variable is not working. None of the commit messages gets the prefix. I briefly looked into the source code and it looks like the uses of commit-in-action does not fit to the actual library signature. E.g. the CommitManager.push method does not take any arguments, but the prefixed commit message is passed to this function.

I rely on semantic commits, so that's an issue :P.

Check the commit messages and GitHub workflow config here:
https://github.com/dword-design/test-sync-github-metadata/commits/master

Error: Resource not accessible by integration

I get the following errors:

action-sync-node-meta v1.3.1
Syncing direction: package.json โ†’ GitHub repository info
 Description             failed 
  pkg.description: 'Foo'
  repository.description: 'Bar'
  ##[error]HttpError: Resource not accessible by integration
      at /home/runner/work/_actions/jaid/action-sync-node-meta/v1.4.0/build/index.js:6:219539
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async q.requestGithubApi (/home/runner/work/_actions/jaid/action-sync-node-meta/v1.4.0/build/index.js:6:1057993)
      at async q.applyGithubUpdate (/home/runner/work/_actions/jaid/action-sync-node-meta/v1.4.0/build/index.js:6:1058148)
      at async /home/runner/work/_actions/jaid/action-sync-node-meta/v1.4.0/build/index.js:6:1060873
  API endpoint: PATCH /repos/:owner/:repo
  API options: owner, repo, description
 Homepage              disabled 
 Keywords                failed 
##[error]jaid/action-sync-node-meta threw an Error
##[error]Error: Syncing failed
    at /home/runner/work/_actions/jaid/action-sync-node-meta/v1.4.0/build/index.js:6:1062658
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Any ideas?

Thanks!

Feature Request: Set name in package.json based on repo name

Greetings,

I'm just now digging into how GH Actions work. Its a bit hairy on first glance.
How hard would it be to add setting the name parameter in package.json to match the name of the repo created from a GitHub Template?

Right now my package.json name in the template I created is just "changeme" but when Someone clicks "Use this Template" I'd love if the very first thing the action did was to set the name to match the name of the new repo.

Is this difficult?

Just reading your action is helping me understand this feature immensely, thank you.

Action throws a TypeError

I am getting the following error:

Error: TypeError: e.request is not a function
      at W.requestGithubApi (/home/runner/work/_actions/jaid/action-sync-node-meta/v2.0.0/build/index.js:6:7918[39](https://github.com/EXILL-SUARL/batch-blur-images/runs/7915332768?check_suite_focus=true#step:3:42))
      at W.applyGithubUpdate (/home/runner/work/_actions/jaid/action-sync-node-meta/v2.0.0/build/index.js:6:793695)
      at /home/runner/work/_actions/jaid/action-sync-node-meta/v2.0.0/build/index.js:6:795432
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
  API endpoint: PUT /repos/:owner/:repo/topics
  API options: owner, repo, names
Error: jaid/action-sync-node-meta threw an Error
Error: Error: Syncing failed
    at /home/runner/work/_actions/jaid/action-sync-node-meta/v2.0.0/build/index.js:6:797172
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Link to the logs: https://github.com/EXILL-SUARL/batch-blur-images/runs/7915332768?check_suite_focus=true#step:3:17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.