How can I publish a package using GitLab instead of GitHub?


I would like to primarily use GitLab instead of GitHub, but I’m confused about the workflow. I tried publishing a package with APM and using the GitLab URL in the package.json file, but it just comes up with an error. Using the GitHub URL works, though.


From the Flight Manual:

There are a few things you should double check before publishing:

  • Your package.json file has name, description, and repository fields.
  • Your package.json file has a version field with a value of “0.0.0”.
  • Your package.json file has an engines field that contains an entry for Atom such as: "engines": {"atom": ">=1.0.0 <2.0.0"}.
  • Your package has a file at the root.
  • Your repository URL in the package.json file is the same as the URL of your repository.
  • Your package is in a Git repository that has been pushed to GitHub. Follow this guide if your package isn’t already on GitHub.

Given that Atom is made by GitHub, it’s should be no surprise they want you to use their products. But yeah, I understand any frustration regarding this.


It wouldn’t be hard to set up a pre-push hook to also push to the GitHub repo. The biggest difficulty in using GitHub as a mirror would be dealing with issues, since most people are going to go to GitHub by default, and they might not notice a mention in the readme about the fact that that site isn’t the home of the development.


There are a few things you should double check before publishing:

Semi off-topic: I think this list could be improved by the following items, or even better, should be checked by apm prior to publishing:

  • a description in package.json cannot be the default one
  • the cannot be the default one
  • the screenshot cannot be the default one

This would help improving the quality of submitted presets. Also, one should consider displaying a warning when a theme submission does not include a screenshot, themes with no possibility of a preview are a bad user experience. Since many authors don’t seem to care, it should probably be suggested (or enforced) by a tool.


A quick glance at the code for apm publish and it looks like the only place they check for a github repo is when making sure the new tag is published.

  # Check for the tag being available from the GitHub API before notifying
  # about the new version.

You could create a pull request that uses gitlab instead if the repo is from gitlab