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

Config option to check git remote URLs for blacklisted keywords #4

Closed
wants to merge 4 commits into from

Conversation

jiriks74
Copy link
Owner

@jiriks74 jiriks74 commented Sep 28, 2023

Adds a new config option for blacklisting strings found in git repo URLs.

blacklist_repos = {
  -- strings to match git remote urls for
}

Was originally kinda confused why blacklists weren't working, since the readme mentioned "workspace" and I guess I just assumed that meant git repos. This should clear things up.

[#48] Config option to check git remote URLs for blacklisted keywords

https://openproject.stefka.eu/work_packages/48

@jiriks74
Copy link
Owner Author

@Lamby777 Do you think that it would be good to add a check if the upstream repository is public?

Eg. a check for 403 or 404 response on the repo url

@Lamby777
Copy link

@Lamby777 Do you think that it would be good to add a check if the upstream repository is public?

Eg. a check for 403 or 404 response on the repo url

as a separate config option?

idk it'd be nice to have but also having it on all the time is eh. maybe you're working on some private thing that people know and care about but you just don't want to give the actual source code...?

@jiriks74
Copy link
Owner Author

jiriks74 commented Sep 28, 2023

as a separate config option?

idk it'd be nice to have but also having it on all the time is eh. maybe you're working on some private thing that people know and care about but you just don't want to give the actual source code...?

From what I understand this disables the View Repository and not the Working on xy, right?

What I suggest is that it would disable the View Repository button if the repo URL cannot be open as it's private. Even if you want people to know that you're working on your closed-source project you get the Working on xy but people won't click on the View Repository only to find out that it's 404 or 403.

(sorry I haven't had the time to look at the code, I've only added Flatpak support and migrated some PRs so far. I'm also new to Lua so my code practices in this languages aren't really as they should be)

@Lamby777
Copy link

as a separate config option?
idk it'd be nice to have but also having it on all the time is eh. maybe you're working on some private thing that people know and care about but you just don't want to give the actual source code...?

From what I understand this disables the View Repository and not the Working on xy, right?

What I suggest is that it would disable the View Repository button if the repo URL cannot be open as it's private. Even if you want people to know that you're working on your closed-source project you get the Working on xy but people won't click on the View Repository only to find out that it's 404 or 403.

(sorry I haven't had the time to look at the code, I've only added Flatpak support and migrated some PRs so far. I'm also new to Lua so my code practices in this languages aren't really as they should be)

Sounds nice. Only issue is that some people might have access to the repo and want to click, but the thing isn't there, so they have to go manually find it on the site. Still, would just be easily solved by having a config option for this.

I have no idea how to make network requests in Lua, though... could prob check some other plugin like lazy.nvim or mason maybe and see how they do things.

Is the original project dead? Is this like a revive?

@jiriks74
Copy link
Owner Author

jiriks74 commented Sep 29, 2023

I have no idea how to make network requests in Lua, though... could prob check some other plugin like lazy.nvim or mason maybe and see how they do things.

I don't know how to basically anything in Lua but hey I've figured out how to make Flatpak work without any bodges so I think that we'll figure this out too.

Is the original project dead? Is this like a revive?

Honestly I have no idea. I've looked at the repo and the last commit was Jan 29 and last comment from a maintainer was on Aug 9 and that was approving a PR that was not merged even after it being approved.

It sure looks dead to me.

I needed this to work with Flatpak as I'm running VanillaOS which is an immutable distro. I want to modify the host OS as least as possible so I read through the docs for RPC with Flatpak Discord, opened a PR and saw that there was no activity for 9 months now. So I just added some PRs (where I could see that nothing will break and it did what it said) and here we.

If the project's dead - I hope I'll be able to do something with it. If it isn't - it's good to have something up to date in until the project wakes up again.

@jiriks74
Copy link
Owner Author

jiriks74 commented Apr 8, 2024

Would you please rebase this? I'd look into merging this if there are no other ideas on how to implement this.

@Lamby777
Copy link

Lamby777 commented Apr 9, 2024

Haven't tested if stuff broke but can you check the rebased branch on my fork? There were a couple conflicts while rebasing and i just went through with picking whatever changes my own branch had because the first options looked like the stuff it was meant to replace anyway.

@Lamby777
Copy link

Lamby777 commented Apr 9, 2024

NVM, I just got 4 notifications from the new CI stuff you added saying it fails style checks lmfao idk

@jiriks74
Copy link
Owner Author

jiriks74 commented Apr 9, 2024

NVM, I just got 4 notifications from the new CI stuff you added saying it fails style checks lmfao idk

Yeah. I get that it can be annoying but I sadly had to add it as people liked to format the code and since everybody used something else to format it it always changed every line in the file and made the contributions literally unreadable (something like this).

@jiriks74
Copy link
Owner Author

jiriks74 commented Apr 9, 2024

If you're willing to do so you can create a draft PR and allow me to modify the source. I'd look at the diff and see what I could help fix. (I haven't used that functionality of Github yet but it could work).

@Lamby777
Copy link

Lamby777 commented Apr 10, 2024

If you're willing to do so you can create a draft PR and allow me to modify the source. I'd look at the diff and see what I could help fix. (I haven't used that functionality of Github yet but it could work).

Edit: nvm, tired. I thought you meant to set it on THIS pr. It's up at #41

@jiriks74
Copy link
Owner Author

Closing in favor of #41

@jiriks74 jiriks74 closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants