"Resource not accessible by integration" when setting status as organisation - github

I was writing a small integration for github (https://github.com/ligi/kontinuum) which works fine when using with the user that I created it with. Now I wanted to use this integration for an organisation - unfortunately I get the following error when trying to write a status for a commit:
{"message":"Resource not accessible by integration","documentation_url":"https://developer.github.com/v3"}
Reading the documentation there I do not see why writing a status should not work in this context. I think this might be a bug - posting this here as a first stage to a potential bug-report (anyone knows where to report github integration bugs?) and the search for a workaround.

Related

Enable/Disable CodeQL code scanning for a repo using Github Rest API

Is it possible to enable/disable CodeQL code scanning for a repo using Github Rest API in any of the Github accounts?(Personal accounts/ Organization accounts /Enterprise accounts)
https://docs.github.com/en/enterprise-cloud#latest/rest/code-scanning?apiVersion=2022-11-28#about-code-scanning
Please refer to this document.I tried to automate enable/disable codeql for a repo using github rest api.Couldnt find any solution in this documentation.
The API only seems to provide endpoints for getting code scanning results at the moment. Also, until recently you always had to include configuration files in your repository to set up CodeQL code scanning. And depending on what languages you want to scan you might still need configuration files, see the documentation.
However, if you have already set up CodeQL code scanning manually you could maybe use the REST API endpoints for disabling and enabling the already existing code scanning workflow.
Disabling CodeQL code scanning (through the REST API) seems like a rather uncommon use case. Could you explain your use case a bit more in detail? Maybe there are better ways to solve this, for example you can customize which severities cause a pull request check failure.

Is there a way to customize Github checks with CircleCI?

I am currently working on the CI of project and I deploy a preview for each github branch that pass all integration tests.
My CI workflow is executed by CircleCI and I can see the progression on github with Github checks. It works pretty nice but description does not reflect what really happens.
For instance I can see this on github :
My problem is I would like to custom message and details actions link. My last job deploys a preview and I would like to be able to put the link somewhere. The best case should be able to open my preview when I click on details button.
Is there any way to do this ?
I send a mail to CircleCI support and I got this anwser :
Hello,
It is not possible at this time to customize this text. Clicking the
details link will bring you to the job on CircleCI. We are currently
working on a utility that will allow you to post comments to the PR
from within a job that may be close to what you are looking for. This
will exist in an Orb (https://circleci.com/orbs/registry/) but I could
not say exactly how long until this is released, though we are
actively working on it.
You may wish to post to our public facing ideas portal:
https://ideas.circleci.com/ideas as a new idea post. This will let our
community vote for this request. Please let us know if we can assist
any further.
So, unfortunately it is not possible yet. Maybe in the future.

Github No access to code for app integrations

I am trying to setup SonarCloud for Github, and getting the following issue (see screenshot).
I know that github recently changed some of its permission models, so how can i allow an app access to code?
The lead up issue statement is that I want to write an integration via webhook that will also need to have access to code, so would the solution to the above mentioned issue resolve that, or is that a different permission model?

github error on create release: tag could not be created, pre-receive hooks failed

I am not by any means a sophisticated github user. I have learned the minimum handful of commands needed to add, commit, and push my project code to the public github.com repository. So far it's been working fairly well... until today when I tried to create a new release (my third).
For some reason, when I try to publish my new release, I get the message
Tag could not be created. Pre-receive hooks failed.
I have never seen this message before.
I have tried various different tag names; I have tried logging out and back in again; I have tried pre-tagging on my local disk copy of the repo; I have pushed and pulled (both ends are up to date). This about exhausts my repertoire of things to try :-(
As a relative n00b I find this message incredibly opaque (sigh). I have tried googling for it, but quickly got in over my head -- most of the hits I found were discussions about people setting up their own networked repos and installing or tweaking their own custom "pre-receive hooks", whereas I am just a dumb user of github.com apparently struggling with whatever "pre-receive hooks" they have installed (?). If anyone can at least point me in the right direction I'd be most grateful.
Make sure you select the tag version in the dropdown. The GitHub form will let you submit when this field is blank, but it will always display the mentioned error message. (You do not need a 'v' prefix.).
The latest Github form makes this more cryptic by having a dropdown titled 'Tag:Choose or Create" that hides the fact that this field is both required but not set.
Latest Github Form
Older Github Form
In a GitHub context, I have seen that error message in this issue
It could be a tag naming convention issue.
The GitHub release documentation recommends (enforces?) a tag following the semantic versioning naming scheme: vX.Y.Z.
As shown here, try vx.y.z.

How to commit on Github and automatically mark done on Basecamp?

I have a GitHub account and Basecamp account. I have already setup my GitHub to use Basecamp service hook by selecting Service Hooks Menu and select basecamp. Fill all required form and get the setup work properly identified by green color.
Now, I have to-do list at my Basecamp account, but I don't know how to interact between GitHub commit comment and Basecamp to-do list.
For example, I commit my code by commenting fixing to-do list #123. But on Basecamp, I can't find to-do list ID (ex:#123) like common project management that I use before. I also can't find a documentation about it.
Can someone help me with this?
I don't think that's possible with the existing github-basecamp integration (the one in the predefined service hooks). So, in short: if I'm correct, it cannot be done the way you can close github issues, which you also seem to be referring.
So basically you'd need to do some coding of your own. You have two main choices.
You can enable a webhook in your github service hooks, have that do a POST request to an url of your choice, and have a script at that url use basecamp API to update the list. The todolists api seems quite simple: you should read a commit message coming in the POST request, and do a "update todolist" request with "completed": true.
Another alternative is to interact with Basecamp API from your local repo. There seems to be some existing tool called gitcamp, made by someone, to help with that - however as the api is quite simple, as well as your requirement, you could do your stuff with a custom script installed as a hook, and possibly with more ease.
I have send a same question to both github and basecamp support and bellow they answer.
Basecamp Support:
Sorry about that confusion with the GitHub integration! At the moment,
that integration only brings in the commits you make into the Progress
page and recaps. Here's the code behind that integration so you can
get a better idea of the guts of that service hook:
https://github.com/github/github-services/blob/master/services/basecamp.rb
If you have any other questions, just let me know and I'll be happy to
help. And have an awesome Sunday!
Chase Clemons 37signals CustomerCare
Github Support:
The Basecamp hook is for the new Basecamp system, and only adds to a
project's event log. There is a Basecamp Classic hook for the older
Basecamp system. It looks like that hook only creates Basecamp
messages. It doesn't look like anyone has written any Basecamp to-do
integration with GitHub at this time. Our 3rd party hooks are
contributed by other users because we don't actually use any of those
services (Basecamp included). You're welcome to contribute to them:
https://github.com/github/github-services
So it's clear at the moment (when I write this), what we commit and push into Github repository just automatically show on Basecamp Progress page.