Giter Site home page Giter Site logo

leonhartx / gas-github Goto Github PK

View Code? Open in Web Editor NEW
3.4K 19.0 69.0 417 KB

sync gas code to github

Home Page: https://chrome.google.com/webstore/detail/lfjcgcmkmjjlieihflfhjopckgpelofo

License: MIT License

JavaScript 60.40% HTML 31.07% CSS 8.13% Ruby 0.40%
github-enterprise gas gas-editor diff-dialog github github-api chrome-extension google-apps-script

gas-github's People

Contributors

alex-galey avatar arrowana avatar gulliveruk avatar hell-k avatar joelbalmer avatar johnkershaw avatar leonhartx avatar maininformer avatar marekkalnik avatar nikopen avatar oshliaer avatar romainvialard 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

gas-github's Issues

I can neither pull nor push from gas

I could create the repo
I could create a new branch
But whenever I make changes on my .gs files via script.google.com and push, it says:
"Everything already up to date" though the files are not on github.
And whenever I push .gs files from another IDE to gihub, then try to pull it from script.google.com, it says:
"Nothing to pull" though the files are on github.

Unable to Push/Pull to Bitbucket

I have had several commits over the last few weeks with no issue. Now when I try to push I get a "reject is not defined" error. I have reinstalled, reconnected, rebooted and tried in a new repository with no success.

Supporting .gitignore?

We have a couple of .gs files that should not be commited (dev variables and the like). I've noticed that pushing to the repo will ignore the .gitignore rules. Is that an issue with the github api?

Only able to pull 14 files from a GitLab private repo

I was able to push a Google Apps Script project with 26 files, .gs and .html, but when I try to pull them to a new project only 14 files are pulled. One of my files has almost 800 code lines, size 27.5 KB, the other files have less than 200 code lines, size less than 4 KB each.

Originally my project had four files on the "root folder" (file name without folder/ prefix) and the others on a folder named scripts. I moved the files on scripts to other folders and renamed the scripts folder but still only 14 files where successfully pulled.

I pushed the missing Apps Script project files to a new GitLab projects and that way I was able to pull all the files into my project. To "fork" the Apps Script project is easier to make a copy of the "master" Apps Script project but to "merge" the changes into it I have to use several repos with a maximum of 14 files.

Is there something on my side to overcome the 14 files pull limit?

Multiple tab issues

when opening multiple gas editor tabs, the extension's got strange behavior sometimes.

App not working - Files not recognised.

When I make changes and put to master branch - message appears saying Everything already up-to-date. There seems to be an issue recognising the files. With one update it deleted them all from the remove repo.

I can only add on .gs file per repository?

I tried pushing two different gs files to the same branch on the same repository. Each file had a different name, but the second file pushed overwrote the 1st file in the master branch, even though they are separate files.

Can't Login SCM

After clicking the "Login SCM" button, a new tab "chrome-extension://lfjcgcmkmjjlieihflfhjopckgpelofo/options/options.html" was opened and kept loading without any response.

Double dot in .gs file name when pulling

I get a failure to pull in a new repository, which looks like it may be because the extension is trying to create a file called "blah..gs" instead of "blah.gs". See the attached screenshot.

This could potentially be related to me initially trying to sync the repo with no project name set (which didn't work) before I defined a name for the script project, which caused it to save, at which point the error changed to the one I'm filing as this issue.

screenshot 2018-11-01 at 3 46 12 pm

Initial push does not add all files

I have a library with around 60 files, all with .gs extensions.
My initial push only pushed 26 to bitbucket.

Any further push or pull gave an already up to date message.

Changing the extension in options to '.js' and pushed again another 23 files were added, but I don't have any files with .js extensions?

Icon/Promo Image wanted

Sadly because the lack of design skills for myself, it's hard to improve the currently ugly stuffs.
So I'll be very appreciate if anyone can design a better icon/promotion image for this extension ๐Ÿ˜„

Error in pulling/pushing

I can't push or pull - it looks like it's using getFileContent which may be deprecated?

The error I get in debugging is:

//EX[2,1,["com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533","This application is out of date, please click the refresh button on your browser. ( Could not locate requested method \x27getFileContent(com.google.apps.maestro.server.frontend.common.shared.ProjectMetadata)\x27 in interface \x27com.google.apps.maestro.ide.shared.IdeService\x27 )"],0,7]

Pull / Push more than one gs not working as expecte

The plugin works when only working with one gs file. When I try to add a second one, it is pushes correctly. But when I make changes and push again, I get an error and it is not pushed. When I try to pull, the plugin wants to delete this file. When I delete it, I can push again, but then I run in the same problem.

From this I think the problem is: For some reason the plugin can not recognize more than one gs file in the repo.

I am using a GitLab Repo.

Error when Script Editor is loaded with Github Enterprise

Hi there I get the following erro in my console when I load an existing App Script project:

Failed to load https://github.bus.zalan.do//api/v3/user/orgs?access_token=<TOKEN>: Redirect from 'https://github.bus.zalan.do//api/v3/user/orgs?access_token=<TOKEN>' to 'https://github.bus.zalan.do/login?return_to=https%3A%2F%2Fgithub.bus.zalan.do%2Fapi%2Fv3%2Fuser%2Forgs%3Faccess_token%3D<TOKEN>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-extension://lfjcgcmkmjjlieihflfhjopckgpelofo' is therefore not allowed access.

Is this due to our company's security settings?

I logged in to our Github Enterprise account using an access token that I generated from within Github

Push/Pull not working - get undefined error in GAS

I am using tokens to authenticate.
I've activated both repo and gyst scopes.

Created a repo on GitHub, initialized there (added a file).
I can see the repo and master branch in the extension but either push or pull gets a red error with nothing but 'undefined'.

image

Repo does not get saved in the cache

On select a repo and reload the page, I need to select the repo again. Also, on reopening an script, the repo doesn't have been saved in the cache.

At my company we have hundreds of repos, so the experience is annoying to look for the repo every time :/

My colleague does not have this issue. And I didn't have it 6 months ago, so I'm not sure what could be... Posting the issue to see if someone could help to find the problem.

[Enhancement] Support bitbucket

This is an awesome tool. However, github private repos are a pay-to-play service. Bitbucket offers private repos free of charge so it would be beneficial to have this tool support bitbucket repos as well.

Some .gs are ignored when pushing // Diff 'undefined'

I have 4 files in a script, two of them called 'onOpen.gs' and 'onEdit.gs'. This 2 files are ignored by the assistant. Instead of finding the changes in this 2 files, it gets next changes:
screenshot 2017-02-24 12 44 04

I pushed the 2 files with the terminal. When pulling them from the IDE, assistant keep ignoring the existing files in the IDE and suggest me to add them as new. When accepting to add them as new, next error is thrown:
screenshot 2017-02-24 12 43 48

I've been using the assistant for a month, and it's a recurrent bug: ignoring some files and/or detecting diffs in an 'undefined' file.

gas-github not able to detect files in my script editor

backgroud:
I am using G suite service which is offered by my company.

Recently whenever I push to my github repo, it deletes everything in the repo, mostly because gas-github does not detect anything in my gs editor.

capture2

Leon, your add-on helped me so much in the past and it would be really painful to live without it lol.

Let me know if there is a solution for this.

[Blocker] Reject is not defined

I've been using the assistant several months, yesterday was working properly.

Today, either 'Pull' and 'Push' triggers next error:
screenshot 2018-02-08 11 47 58

My coworker tried it and he had the same issue. Anyone else having same issue?

It's a full blocker :(

no code pushed, saying Everything already up-to-date

Hi,

I may have same issue as this issue mentioned #58, I created new repo and pushed, it shows "Everything already up-to-date" and no code pushed when I verify on github.
I verified the known issues here https://github.com/leonhartX/gas-github#5known-issues, but my code file is not empty, while no function name is same as any file name, you have below screenshot with all functions' names and only one file.
a

Thanks in advance for your help.

Best,

Push/Pull deleting files

I tried pushing my latest commit and it ended up removing all of my files from GitHub as if they were not there. Then, when I tried to pull from another branch, it tried to duplicate all files. Please fix.

Pushing with File type to sync .gs fails

This is someway similar to #51

Pushing a Google Apps Script project to gitlab.com with File type to sync .gs fails, no matter of the number of files on the project and the number on code lines on the files.

Steps to reproduce

  1. On gitlab.com, create a new project and set visibility to private
  2. Add a new file to create the repository and the master branch
  3. On Google Apps Scripts, create a new project, add a title
  4. On the Google Apps Scripts GitHub Assistant toolbar, select the project created on 1, and the branch created on 2
  5. File type to sync .gs is the default setting, so just click on Push
  6. Write a commit comment and click on Push

A Push failed error message is shown. No files were pushed to gitlab.com

Workaround

  1. On the Google Apps Scripts GitHub Assistant toolbar, click on Config, set File type to sync to .js
  2. Click on Push

A Push successful message is shown.

bug : pull from gist resulting in f() is not a function

Hi,

first of all - thanks for this great extension ! :)

I have encountered a bug while pulling from a gist - after the "diff" screen I get an f() is not a function error and the code does not update.

The faulty line is https://github.com/leonhartX/gas-github/blob/master/src/gas-api.js#L7.
If there is no match (a file not ending in .gs or .html) return; returns undefined and results in https://github.com/leonhartX/gas-github/blob/master/src/gas-api.js#L43 failing due to f() being undefined.

In my example I wanted to commit a .gitignore file and it didn't work.

I would suggesting either returning empty function or filtering the array to remove empty items to pull only compatible files and don't break on other. What do you think?

Error pulling / pushing when using a corporate Google Apps account.

Firstly, this extension is amazing!

However, I've found an issue when using it with a corporate Google Apps account - it gives the error
"get apps script code failed"

when I looked at the underlying javascript error it's

"Type name elision in RPC payloads is only supported if the RPC whitelist is used"

After digging, I believe it's caused by the extension not taking into account that whereas a standard base url would be

https://script.google.com/macros/d/${context.projectId}/gwt/;

a corporate Google Apps base url would be

https://script.google.com/a/company.com/macros/d/${context.projectId}/gwt/;

will make a pull request for my change which fixes this by using the value background.js retrieves vs the derived base url in gas-hub.js

Firefox

What does it need to be available on Firefox?

If the steps are known and it's straightforward,
I could devote some time to do it.

nice plugin @leonhartX !

Mixed case filenames in GAS project

Using mixed case filenames in GAS project causes strange behavior when push and pull.

  1. Create new GAS project
  2. Create a file, helloWorld.gs
  3. Push GAS project to Github
  4. Edit helloWorld.gs and rename it to helloworld.gs
  5. Try push and pull.

Can't log into Github any more from Apps Script editor w/ Github Assistant v3.0.1

Hi LeonhartX. I've got v3.0.1 of your excellent extension installed. But now when I open the script editor I have a warning message at the top saying, "Extension has been updated, please relogin Dismiss." Clicking on the "Dismiss" link does nothing. It is dead. I do see that I'm not logged into Github any more in the editor so when I click the Assistant's button to "Login SCM," I get the following page:
lfjcgcmkmjjlieihflfhjopckgpelofo is blocked

Requests to the server have been blocked by an extension.
Try disabling your extensions.
ERR_BLOCKED_BY_CLIENT

I've logged out of Chrome. I've logged out of Github. I've logged out of Google. I've disabled, removed, and reinstalled the Assistant extension. No other extensions seem relevant but I've disabled them all. I've closed the browser entirely. Can you please help me figure out what I need to do to get back in? I think the fact that the warning's "Dismiss" link is dead might be a clue, but not for me. :-( Thx, - Jeff

On create new branch, it doesn't appear in the list

On create a new branch from the assistant, it doesn't appear. In order to solve it, I need to reload the page several times until it appears... the experience is frustrating :(

Is there some way to do a manual sync with github?

PS: The manual sync would be also useful for outdated code in the assistant cache (i.e. It happened to me to create some wrong commits pushing my new code to a old cache version of the branch)

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.