-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement opt-in/out for pull requests #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 🎉
First: thanks for the fast implementation @zauberstuhl (probably faster than I can integrate that in our projects ;) ) Lets discuss opt-in and opt-out separately (I think they should work a bit differently because they have different use-cases): Opt-inI think The best solution for me would be when we could configure the label needed for that (as you proposed in #4 (comment)). We already have a If you don't want to make the opt-in label configurable, at least name it something including "federation", so it's clear that this is only for federation tests. Also: Checking PR title and message and labels is OK to me here (I probably would use Opt-outHere I think the generic
I think travis only checks the commit-message (for a push to a branch directly or for a PR the last commit counts). When adding commits to a PR, it checks the new commits and if it doesn't contain a For me it's probably fine when you only check the PR title/message, but I think you receive all commit-messages in the hook too (I never built something with github hooks, so I'm not 100% sure), so I think it should be relatively easy to just check if the last commit-message for this hook-call contains a And if you want to be super-cool you also add both |
@SuperTux88 thanks for your input! I changed following now:
I was too lazy making another API call to github. That was the reason why I asked whether we need it or not. In retrospect it was stupid and being able to search commit messages could come in handy. I tested manually the current implementation #9 and if there are no further objections/suggestions I would merge!
Haha I saw that too. I guess with custom flags it should be obsolete now.
Thats totally fine ;) Something not related to this PR; @SuperTux88 do you want to join thefederationinfo organization? |
Looks good to me 👍
I didn't know you need API calls for that, but as said: I have no idea how these integrations work in detail. But cool that it now works :)
I think the problem is, when different people want to use different flags (because they are used to the one or the other from using with travis). ;) Custom flags would solve this when they can be a regex. But it's perfectly fine as it is now and I think it fits all my needs. It could always be improved in the future in case somebody really needs it.
I don't know what your plan is with this organization and I don't know how much time I'll have or if I could help much (probably not much with this repo, since I don't have much go experience, but maybe with the diaspora integration in federation-tests). But if you think it would help feel free to add me. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't judge the code and I didn't test it, but the screenshot looks like it fits my needs 👍
The workflow would be as following: You (the owner) of a repository can grant access to the repository we want to cover. admin:repo_hookThis is required cause we want to automatically create a repository webhook which reports created pull-requests. The webhook can only handle pull request events see https://github.com/thefederationinfo/github-integration/blob/master/frontend.go#L117 repo:statusWe need this to update status messages on commits. A commit status message is what you see in a pull request e.g. has travis passed all tests. See https://developer.github.com/v3/repos/statuses/#create-a-status To summarize it; The server will now be able to receive PR requests from your repo and can update commit statuses. If a pull request is made, github will report to the-federation.info and the server can then decide whether we should trigger a travis build with tests defined in here: https://github.com/thefederationinfo/federation-tests
mh thats true lets solve this in the future :) #10
Don't worry I am glad if you simply report your thoughts if I am trying to improve federation again ;) Time for bed now 💤 |
closes #4
That will check the PR title, body-message and label names. It would require a bit more magic if
we want to check commit messages as well but Is that actually necessary? @SuperTux88