-
Notifications
You must be signed in to change notification settings - Fork 7
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
Git hooks do not work #6
Comments
Ok, thanks :-) I also use Windows, so there is another factor causing this defect. I will add some diagnostics and we can learn more. Please wait for an update. In the mean time, would you share some more information?
|
Hm, ok. I was doubtful abouth this
|
Ok, part 1 is fixed. I needed to remove the file name. I will try the upload now again |
Ok, I think now the access token causes the problem. Which access rights does it need? I actually don't like to permit more than I'm required to do and That's the message:
|
The token is used to create labels and issues on a repository. Looking at GitHub's definition of scopes My OAuth token has three privileges:
If you want to find the minimal set, try changing |
I tried it with all rights and it still didn't worked. Therefore, I assume there is any login problem, but I couldn't figure that out yet :/ |
Ok, two more things:
|
Ok, the authentication works now and additionally it created the label:
Can you confirm, that a second install does not change the token in the file? I actually assume it, because when I set up a new one and edited it manually, it worked. Which exact commit message do I need to create an issue? That's what still does not work. Already thanks for your support :) |
Ok, following your tutorial worked, although I get now another error message while trying to create the issue:
FURTHERMORE: Jekyll has in it's default post the title in I'd like to see you giving an example of a commit message, because the actual text is a bit confusing |
Great, I'll add that to the setup instructions.
You're correct: a second install will not change the hook -- the script will check to see if it is already installed and do nothing if so.
The commit message does not affect gpgc's behavior; instead, it is the post's front matter.
Look at my example posts' front matter titles: 2015-01-18-the-phrenic-shrine-reveals-itself.md
Please remove the bookend quotes from the title in your front matter. I believe this is the bug :-)
Yes, I can add that as well. |
I would suggest you to change this behavior. I would expect it to be set again. Yeah, I removed the Here is an example post called
This post file still leads to this error:
|
Thanks. This is captured here: #7 -- Installing git hooks should create or update them
Ok, let's get some specific diagnostics. Please insert a line in
and NOTEThis change will print your OAuth token to the terminal when you push. Before you place the output here, please redact your token. |
That's the output:
|
I see a second bug :-) Change your Before
After
The script needs to accommodate yml syntax more gracefully than it currently does. |
That was the problem :) Thanks a lot :) |
Sure thing :-) I'll create a few more issues from this thread, and it looks like I have some hardening to do :-) |
Issues created:
|
Harden parsing yml from bash: * Allow but ignore whitespace before nad after a key's name so that the script can always find it * Delete any in-line comments after the value since they're not part of the value * Delete any double-quotes since they break the JSON format
* YML requires variable keys start on the beginning of the line, so don't allow leading whitespace * Only use the first hit for a key; perhaps the user is using the key in their post * Delete any leading white space before in-line comments
Two pages show that this issue has been fixed:
|
Well i'm in osx and my commit hooks do not fire, so i am having to run At first i noticed they didn't have execute priv so i changed them to have it. But still no joy. Is there something in the code somewhere that is checking to see what branch you are on / pushing etc? |
Aside from the symptom of the comment thread not being created when you If you see the test messages when you
What's your hypothesis? |
I will run those tests in a moment. My hypothesis is that I push my _site to master and the the rest of it to 'sources' branch. see here. So i'm wondering if there is a branch check in there wherein if im not pushing to master the .sh the hooks call somehow decided not to open the issue. But I figure it isn't the case. |
Hmm never mind, for some reason after putting in the echo and turning on diagnostics it worked when i pushed this time. I hope this doesn't turn out to be a heisenbug.
|
Would you describe your workflow for creating and publishing a new post? The hooks assume blog posts live in the |
TBH right now I have it disabled as there is one post that works when diagnostic is enabled and throws an error when it isn't, and I am rewriting my emacs config at the moment and haven't had time to track it down. However I use the standard workflow, just from emacs: I export from my .org file it places the post in _posts In this way i push the rendered stuff to be displayed, and my sources branch keeps track of the un-rendered content. I will look back In to this when done with emacs. The thing i find most odd is that running bootstrap and then push works where as the hooks do not. When they appear to be doing generally the same thing. |
Thanks, I'd like a few more details because my understand isn't complete.
I don't understand any of this :-(
Ok, so it's a local build on your Mac.
What is the result of this action?
Ok.
What is the result of this action? Why do you push twice for a single post? Is that how you separate rendered pages from static pages and resources (or, why do you keep those in different branches)? |
Actually, I don't have any clue where I should post it, therefore I do it here.
I like your idea and tried to implement it for my blog: https://github.com/philippneugebauer/philippneugebauer.github.io
Unfortunately, the git hooks do not work for me. I use windows and maybe that's one of the problems.
I provided my access token only for public repos because I guess that must be sufficient.
The setup of the git hooks and the setting of the acces token to the file worked, but GitHub does not create new issues per commit.
The text was updated successfully, but these errors were encountered: