Jump to content

[SOLVED] How to write an Alfred workflow to "go to bottom of GitHub page and click Commit Changes" button ?


Recommended Posts

I am trying to write an workflow that will do following things in github page:

- go to the bottom of the page

- click commit button

 

The main thing is whenever we are editing a file in github online to commit the chages we have to go to 

the bottom of the page and click "Commit changes" button. The github does not have that button on the top

of the webpage and also does not have keyboard shortcut to do that. 

 

Commiting and Pushing edited files from a terminal is pretty simple a simple bash function in `bash_profile` will do that easily, but while working

on online pages, we need to scroll down each time if we need to commit the changes. It will not save a heavy amount of time but if it is possible,

the Alfred workflow to do it worth it.

 

Thanks.

Edited by Bhishan
Link to comment

You’re going about this the wrong way. Don’t automate the page, use their API. If you understand bash, here’s a simple script that uses their API to merge PRs.

 

10 hours ago, Bhishan said:

If anybody know applescript

 

This can’t be done with AppleScript. Automating the page requires you to inject JavaScript on the page to perform the actions.

 

What exactly are you trying to do? Show us an example page and the exact action.

Link to comment

@dfay  @vitor

 

This task proved to be too complicated than I initially thought of.

 

I was just trying to create some hot key that will commit the changes i made in a file in github while working online. Its not a big deal commiting and pushing a file from the local computer to the github online, I was just trying to avoid going to bottom of the page and clicking the green "commit changes" botton each time when working online. It takes just a second but I was looking for alternatives.

 

Example:

- open the README.md file online in github website

- do some changes

- now hitting some keyboard shortcut should commit the changes.

 

 

What I can do:

If I have already cloned the repo locally, I can upload the changed file using some bash commands using alfred.

Edited by Bhishan
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...