Skip to content
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

Remove # consistently from channel name in file upload #1004

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

timja
Copy link
Member

@timja timja commented Aug 29, 2024

See #993

Makes it so that # is removed from both freestyle and pipeline builds from the channel name so that the cache can find the appropriate channel id.

Testing done

Manually tested with freestyle job

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@timja timja requested a review from a team as a code owner August 29, 2024 06:47
String channel = channelName;
if (splitForThread.length == 2) {
channel = splitForThread[0];
if (channel.startsWith("#")) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously was only removed if a thread_ts was attached which was probably more common in pipeline but not always there.

@@ -95,6 +98,19 @@ public static String getChannelId(String botUserToken, String channelName) throw
return channelId;
}

private static String cleanChannelName(String channelName) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to the cache so both freestyle and pipeline share the same common code

@timja timja added the bug label Aug 29, 2024
@timja timja enabled auto-merge (squash) August 29, 2024 06:49
@timja timja merged commit 00f9591 into jenkinsci:master Aug 29, 2024
16 checks passed
@timja timja deleted the hash-file-upload branch August 29, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant