Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Conversation

@fopina
Copy link
Contributor

@fopina fopina commented Apr 10, 2023

Workflow to open pull requests with latest changes from projectdiscovery/httpx to keep this fork up-to-date.

This requires a PAT that is able to open PRs as GITHUB_TOKEN will get blocked due to not being able to trigger PR workflows - even if permission to create PRs is added, it can never trigger workflows.

This closes #27

@fopina fopina requested a review from a team as a code owner April 10, 2023 23:54
@fopina fopina requested review from mariandppb and peterbppb April 10, 2023 23:54
@gsilvapt
Copy link
Contributor

Just to confirm, I can override the repository secret GITHUB_TOKEN with a PAT, correct?
Thanks!

@fopina
Copy link
Contributor Author

fopina commented Apr 11, 2023

GITHUB_TOKEN is a specially scoped secret added on each run, not a repository secret.

As it cannot trigger workflows on PRs, we need a PAT to be used instead.

The action expects the secret as input, so it can be named however we want, I was just suggesting setting it at org level instead of repository.

Probably a name like SURF_BOT_PAT sounds good! (And then I need to update this PR)

@gsilvapt
Copy link
Contributor

GITHUB_TOKEN is a specially scoped secret added on each run, not a repository secret.

As it cannot trigger workflows on PRs, we need a PAT to be used instead.

The action expects the secret as input, so it can be named however we want, I was just suggesting setting it at org level instead of repository.

Probably a name like SURF_BOT_PAT sounds good! (And then I need to update this PR)

We need to start managing this org through Terraform, to facilitate scoping secrets 😂
I'll add the secret at org-level and come back to this PR to let you know (so we can proceed). The secret will be named SURF_BOT_PAT if you want to start working on this.

@gsilvapt
Copy link
Contributor

Done 👍 Tried the new token types, not sure if permission-wise it's all right so we will probably to iterate once or twice 😅 GitHub developer experience...

Signed-off-by: Filipe Pina <636320+fopina@users.noreply.github.com>
@fopina
Copy link
Contributor Author

fopina commented Apr 11, 2023

Workflow updated with the secret name then!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@gsilvapt gsilvapt left a comment

Choose a reason for hiding this comment

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

LGTM, let's test drive it :)

@gsilvapt gsilvapt merged commit c572b67 into main Apr 11, 2023
@gsilvapt gsilvapt deleted the workflows/merge-upstream branch April 11, 2023 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically upgrade fork from upstream changes

3 participants