Skip to content

Add Header User-Agent for request client#5664

Merged
6543 merged 19 commits into
woodpecker-ci:mainfrom
LUKIEYF:faeture/3778
Nov 5, 2025
Merged

Add Header User-Agent for request client#5664
6543 merged 19 commits into
woodpecker-ci:mainfrom
LUKIEYF:faeture/3778

Conversation

@LUKIEYF
Copy link
Copy Markdown
Contributor

@LUKIEYF LUKIEYF commented Oct 21, 2025

add Header User-Agent for request client for more precise in recognized the http request from.

close #3778

LUKIEYF and others added 2 commits October 21, 2025 17:56
add Header User-Agent for request client.
@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Oct 21, 2025

please kindly review and give out the comments, thanks for all. :)

@6543 6543 changed the title feature/3778 > add Header User-Agent for request client Add Header User-Agent for request client Oct 21, 2025
@6543 6543 added the enhancement improve existing features label Oct 21, 2025
Comment thread server/forge/github/github.go Outdated
@woodpecker-bot
Copy link
Copy Markdown
Contributor

woodpecker-bot commented Oct 21, 2025

Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-5664.surge.sh

@6543
Copy link
Copy Markdown
Member

6543 commented Oct 24, 2025

I like documentation but i think shared/httputil/example_usage.md went over the top

just write good docstrings to tje functions inline in the code ... go can generate docs out of that

@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Oct 28, 2025

hi all, the .md is removed. thank you!

@6543
Copy link
Copy Markdown
Member

6543 commented Oct 28, 2025

you have github and gitlab covered but no gitea forgejo or bitbuced*

@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Oct 30, 2025

updated,

bitbucket, forgejo, and gittea. add practices in wrapped http header.

thanks all.

@6543
Copy link
Copy Markdown
Member

6543 commented Oct 31, 2025

you need to add useragent to the cspell allow list ;)

@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Nov 3, 2025

already add 'useragent' to cspell.json to allow the usage of term. thank you : )

@6543 6543 enabled auto-merge (squash) November 3, 2025 10:29
@6543 6543 disabled auto-merge November 3, 2025 10:42
@6543
Copy link
Copy Markdown
Member

6543 commented Nov 3, 2025

only lint issues have to be addressed

@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Nov 4, 2025

thanks for your heads up,

I got some tricky problem in here

I ran the golangci-lint and then got the issues are not the same with the cicd process got one
DEB068DC-C0D9-4D98-8D96-70D6CA55148C_4_5005_c

9A912022-1BA6-40E1-A61D-2A5ED1E0E90A_4_5005_c

do you have any ideas what can I do for this?

@qwerty287
Copy link
Copy Markdown
Contributor

You need to have the web/dist folder. You can just create an empty one or build the UI with pnpm build

LUKIEYF and others added 3 commits November 5, 2025 11:53
I found that it has the restriction of import of the shared/ toward the woodpecker-go, therefore I add the codes into the woodpecker-go either.
@LUKIEYF
Copy link
Copy Markdown
Contributor Author

LUKIEYF commented Nov 5, 2025

fixed the lint issues,

  1. add the useragent files for external go file usage.

I found that it has the restriction of import of the shared/ toward the woodpecker-go, therefore I add the codes into the woodpecker-go either.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 88.11881% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.47%. Comparing base (2cabcc5) to head (b83e3d4).

Files with missing lines Patch % Lines
cli/internal/util.go 0.00% 5 Missing ⚠️
pipeline/backend/docker/docker.go 0.00% 3 Missing ⚠️
woodpecker-go/woodpecker/client.go 50.00% 2 Missing ⚠️
server/forge/forgejo/forgejo.go 66.66% 1 Missing ⚠️
server/forge/gitea/gitea.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5664      +/-   ##
==========================================
+ Coverage   21.34%   21.47%   +0.13%     
==========================================
  Files         426      428       +2     
  Lines       38472    38550      +78     
==========================================
+ Hits         8211     8278      +67     
- Misses      29497    29508      +11     
  Partials      764      764              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@6543 6543 merged commit 40f847b into woodpecker-ci:main Nov 5, 2025
9 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Nov 5, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement improve existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set user-agent for HTTP Requests from Woodpecker

4 participants