[JIRA] (JENKINS-59557) Support Gitea required status checks

0 views
Skip to first unread message

davidsvantesson@gmail.com (JIRA)

unread,
Sep 27, 2019, 1:24:02 AM9/27/19
to jenkinsc...@googlegroups.com
David Svantesson created an issue
 
Jenkins / Improvement JENKINS-59557
Support Gitea required status checks
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: gitea-plugin
Created: 2019-09-27 05:23
Labels: plugin
Priority: Major Major
Reporter: David Svantesson

Gitea now supports [required status checks before merge|https://github.com/go-gitea/gitea/pull/7481] and will be available in next release (Gitea 1.10.0). 

However because the Gitea plugin reports status checks with the context "Pipeline/PR-#" it is not possible to choose a required status check because it will alter for each PR. The number in the end should be removed from the reported context, or at least give the option to doing so. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

scm@amshove.org (JIRA)

unread,
Oct 8, 2019, 5:55:03 AM10/8/19
to jenkinsc...@googlegroups.com
Markus Amshove commented on Improvement JENKINS-59557
 
Re: Support Gitea required status checks

I propose to use `Pipeline/PR-<targetbranch>` as context for PR builds, so that they give additional context when viewed within a PR.

 

In our case we have 2 branches which merge changes into and both need branch protection.

Currently the status check shows builds for both PRs in both PRs, so we would like to discriminate based on the target branch (you can see it as a version of the product).

scm@amshove.org (JIRA)

unread,
Oct 8, 2019, 6:21:02 AM10/8/19
to jenkinsc...@googlegroups.com

Also wouldn't the HEAD build also need another label? Currently for us it is the branch-name

davidsvantesson@gmail.com (JIRA)

unread,
Oct 8, 2019, 6:31:01 AM10/8/19
to jenkinsc...@googlegroups.com

I agree `Pipeline/PR-<targetbranch>` would be a good context.
I don't understand about HEAD as that depends on what you check out. Usually tip of 'master' is considered to be 'HEAD'?

It should be added there was another PR in Gitea to only have 'overall status checks'. It would still be good to change the context from Jenkins to be able to have different checks.

scm@amshove.org (JIRA)

unread,
Oct 8, 2019, 8:14:02 AM10/8/19
to jenkinsc...@googlegroups.com

Currently we get the following status contexts:

 

HEAD (name of the branch)

PR-#prnumber

 

So if I have a branch called `my-cool-feature`, which I open PRs for to the `master` branch and another branch called `qa`, a commit of that branch would get:

`Pipeline/my-cool-feature`

`Pipeline/PR-1` (the one to `master`)

`Pipeline/PR-2` (the one to `qa`)

 

What I would need for status checks:

`Pipeline/HEAD` (or something else, but not the branch name, as this wouldn't work with status checks)

`Pipeline/PR-master`

`Pipeline/PR-qa`

 

 

I've had a look at the plugins sourcecode and the hardest part for me is to understand how the jobname/contexntame could be decoupled, because currently the contextname is just the jobname.

However, the jobname needs to still be something like PR-12345, because otherwise it isn't unique anymore

davidsvantesson@gmail.com (JIRA)

unread,
Oct 8, 2019, 8:43:01 AM10/8/19
to jenkinsc...@googlegroups.com

I see your point now. I think this is more clear than HEAD:
`Pipeline/branch`

Best would maybe be to have it configurable with possibility of using replaceable parameters, but I don't know how hard it would be to do.

davidsvantesson@gmail.com (JIRA)

unread,
Oct 8, 2019, 8:44:03 AM10/8/19
to jenkinsc...@googlegroups.com
David Svantesson edited a comment on Improvement JENKINS-59557
I see your point now. I think this is more clear than HEAD:
`Pipeline/branch`    (exactly like that, not the branch name)

Best would maybe be to have it configurable with possibility of using replaceable parameters, but I don't know how hard it would be to do.

scm@amshove.org (JIRA)

unread,
Nov 30, 2019, 6:33:03 AM11/30/19
to jenkinsc...@googlegroups.com

I've created a PR to solve this issue. I'm open for options or adoption of the context names

 

Reply all
Reply to author
Forward
0 new messages