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

Unable to set up wporg-developer local environment based on instructions #507

Closed
flexseth opened this issue Mar 14, 2024 · 4 comments
Closed

Comments

@flexseth
Copy link

flexseth commented Mar 14, 2024

Edit: Is it necessary to have an existing local dev environment and also the phpdoc-parser package working for this to function correctly based on instructions?

Greetings! I am trying to contribute some to DevHub to update documentation via PRs. As I understand, some of this information is in Posts on the WP site that runs DevHub, which will need to be re-created locally to most easily edit this documentation.

When following the setup scripts (this is my first time using composer) - I'm getting API rate limits that require me to set up token which I haven't been able to get configured correctly.

Steps to re-create

  • Start in a fresh environment
  • Clone this repo
    gh repo clone WordPress/wporg-developer
  • Follow steps outlined in repository to get it up and running.

Who does this effect?

First time contributors to parts of the DevHub.

Possible issue origination

It looks like the original issue stems from:

Failed to execute git checkout 'c7c8e9b04a42da846de1e4a0fa48555b0ce82780' -- && git reset --hard 'c7  
  c8e9b04a42da846de1e4a0fa48555b0ce82780' --                                                            
                                                                                                        
  fatal: reference is not a tree: c7c8e9b04a42da846de1e4a0fa48555b0ce82780                              
                                                                                                        
  It looks like the commit hash is not available in the repository, maybe the commit was removed from   
  the branch? Run "composer update wporg/wporg-parent-2021" to resolve this.    

Error Message

When I try to run the update commands, I'm being rate limited?

GitHub API limit (60 calls/hr) is exhausted, could not fetch https://api.github.com/repos/WordPress/phpdoc-parser/commits/7fc2227d2d4fb73f9f0b6e233413f3f9f9840e80. Create a GitHub OAuth token to go over the API rate limit. You can also wait until 2024-03-14 20:46:47 for the rate limit to reset.

Possible solution

Is it possible to update the packages on the remote upstream so everything installs properly for a new contributor to this repository?

More info on install error

When I run yarn setup:tools the following error occurs:

yarn setup:tools
yarn run v1.22.22
$ yarn && composer install && TEXTDOMAIN=wporg composer exec update-configs && composer --working-dir=./source/wp-content/plugins/phpdoc-parser install
[1/4] 🔍  Resolving packages...
success Already up-to-date.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 2 installs, 0 updates, 0 removals
  - Syncing wporg/wporg-mu-plugins (dev-build 29b536f) into cache
  - Syncing wporg/wporg-parent-2021 (dev-build c7c8e9b) into cache
  - Installing wporg/wporg-mu-plugins (dev-build 29b536f): Cloning 29b536ff88
    29b536ff8822d3c29a9d827cb25e2ef701016c93 is gone (history was rewritten?)
    Install of wporg/wporg-mu-plugins failed
  - Installing wporg/wporg-parent-2021 (dev-build c7c8e9b): Cloning c7c8e9b04a
    c7c8e9b04a42da846de1e4a0fa48555b0ce82780 is gone (history was rewritten?)
    Install of wporg/wporg-parent-2021 failed
    0 [--->------------------------]
In GitDownloader.php line 500:
                                                                                             
  Failed to execute git checkout '29b536ff8822d3c29a9d827cb25e2ef701016c93' -- && git reset  
   --hard '29b536ff8822d3c29a9d827cb25e2ef701016c93' --                                      
                                                                                             
  fatal: reference is not a tree: 29b536ff8822d3c29a9d827cb25e2ef701016c93                   
                                                                                             
  It looks like the commit hash is not available in the repository, maybe the commit was re  
  moved from the branch? Run "composer update wporg/wporg-mu-plugins" to resolve this.
@adamwoodnz
Copy link
Contributor

I am trying to contribute some to DevHub to update documentation via PRs. As I understand, some of this information is in Posts on the WP site that runs DevHub, which will need to be re-created locally to most easily edit this documentation.

Hi @flexseth, to edit post content you don't need a local environment. The best way to contribute currently is to raise a documentation issue at https://github.com/WordPress/Documentation-Issue-Tracker/issues/new/choose so that a docs team member can action the change.

@flexseth
Copy link
Author

@adamwoodnz understood. Was looking to use the Block Editor to build out/edit the docs if possible, really quick with creating content via the UI.

Either way I'll keep the ticket open for a little bit to see if anyone has a moment to look at a fix. Markdown works! I'll close out in two weeks.

@flexseth
Copy link
Author

Don't know if the token took a minute to work, or the package updated, but the enviro seems to be installing now

@flexseth
Copy link
Author

@adamwoodnz, @dd32 - I'm gonna close this.

Thinking it was a token needed to use composer

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

No branches or pull requests

2 participants