github-plugin icon indicating copy to clipboard operation
github-plugin copied to clipboard

[JENKINS-39845] GitHub project URL property should not trim off tree/branch

Open jenkins-infra-bot opened this issue 9 years ago • 5 comments

Currently, if you configure a job and put in the properties the GitHub URL including the branch. The link tree/branch portion gets trimmed off.

I do not want this. I have one Jenkins job per branch and wish the Jenkins job to link back to that specific branch for context.


Originally reported by sag47, imported from: GitHub project URL property should not trim off tree/branch
  • assignee: lanwen
  • status: In Review
  • priority: Minor
  • component(s): github-plugin
  • resolution: Won't Do
  • resolved: 2016-12-12T00:32:33+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-12-08
Raw content of original issue

Currently, if you configure a job and put in the properties the GitHub URL including the branch. The link tree/branch portion gets trimmed off.

I do not want this. I have one Jenkins job per branch and wish the Jenkins job to link back to that specific branch for context.

jenkins-infra-bot avatar Nov 17 '16 23:11 jenkins-infra-bot

integer:
  • Original comment link
  • Raw content of original comment:

    GithubProjectProperty is used and expected by all plugins to have repository URL, that's why it strip everything unrelated.

GithubProjectProperty is used and expected by all plugins to have repository URL, that's why it strip everything unrelated.

jenkins-infra-bot avatar Dec 12 '16 00:12 jenkins-infra-bot

sag47:
  • Original comment link
  • Raw content of original comment:

    This is unhelpful behavior. It shouldn't trim off the full project URL because it completely ignores projects which were configured with specific branches. It is unfriendly to a user to drop them into a project that has many branches when the Jenkins job was configured for a specific branch. This line of thinking should be re-evaluated as to what value the current behavior is providing.

    I suggest that the current behavior is unfriendly and should not have been designed in the current manner.

    I'm willing to propose a pull request with a fix if you're willing to accept it.

This is unhelpful behavior. It shouldn't trim off the full project URL because it completely ignores projects which were configured with specific branches. It is unfriendly to a user to drop them into a project that has many branches when the Jenkins job was configured for a specific branch. This line of thinking should be re-evaluated as to what value the current behavior is providing.

I suggest that the current behavior is unfriendly and should not have been designed in the current manner.

I'm willing to propose a pull request with a fix if you're willing to accept it.

jenkins-infra-bot avatar Dec 12 '16 23:12 jenkins-infra-bot

integer:
  • Original comment link
  • Raw content of original comment:

    Branch per job is not expected behaviour. Cool triggers providing links directly to branch . This property is expected to represent repository. If you change it then people will be confused. I would suggest you attach additional BranchAction from some Listener ExtensionPoint.

Branch per job is not expected behaviour. Cool triggers providing links directly to branch . This property is expected to represent repository. If you change it then people will be confused. I would suggest you attach additional BranchAction from some Listener ExtensionPoint.

jenkins-infra-bot avatar Dec 12 '16 23:12 jenkins-infra-bot

sag47:
  • Original comment link
  • Raw content of original comment:

    What I mean is the UI linking to a specific branch. I don't think it would confuse people. If a user wants it to represent a repository/project then they can set it to that. In this case, it is my desire for the UI to link the user to the specific branch of the project.

    Branch per job is not expected behaviour.

    Why is this not expected behavior? Jenkins can be configured to build only a specific branch. Why would it not be expected or desirable that one would want to link to said branch in the project URL? It's not about providing an automatic hook. This issue is about linking a user to the appropriate section of a code base for a given configured Jenkins job. I don't see how this could be confusing for a user; especially if the release notes properly communicate the change.

What I mean is the UI linking to a specific branch. I don't think it would confuse people. If a user wants it to represent a repository/project then they can set it to that. In this case, it is my desire for the UI to link the user to the specific branch of the project.

Branch per job is not expected behaviour.

Why is this not expected behavior? Jenkins can be configured to build only a specific branch. Why would it not be expected or desirable that one would want to link to said branch in the project URL? It's not about providing an automatic hook. This issue is about linking a user to the appropriate section of a code base for a given configured Jenkins job. I don't see how this could be confusing for a user; especially if the release notes properly communicate the change.

jenkins-infra-bot avatar Dec 12 '16 23:12 jenkins-infra-bot

lanwen:
  • Original comment link
  • Raw content of original comment:

    This property is used (programmatically) in most places as a link to root of projects and expected to be without any additional path. If u want exact branch - you can send us PR with additional field that can point to exact place in UI. But we will not change current behavior of existing field ever.

This property is used (programmatically) in most places as a link to root of projects and expected to be without any additional path.
If u want exact branch - you can send us PR with additional field that can point to exact place in UI. But we will not change current behavior of existing field ever.

jenkins-infra-bot avatar Dec 14 '16 15:12 jenkins-infra-bot