forgeflux-org / interface Goto Github PK
View Code? Open in Web Editor NEWAPI-space software forge federation
License: GNU Affero General Public License v3.0
API-space software forge federation
License: GNU Affero General Public License v3.0
Our current PR workflow looks like this:
https://github.com/{owner}/{repo}/pull/{id}.patch
.fignore
If the PR was made up of multiple commits, we are losing valuable commit messages. I think we can accommodate multi-commit PRs by generating a sequence of patches for each commit of the PR.
As of right now, the GITEA_HOST
variable in the .github/workflows/coverage.yml
is hard coded into the file.
This has been done as there seems to be an error faced during the CI.
The current line should ideally be converted into,
DYNACONF_GITEA__HOST : ${{ secrets.DYNACONF_GITEA__HOST }}
Currently we are storing dates in string type since sqlite doesn't have support for a date datatype. This makes sorting a pain, so I recommend storing dates in unix timestamps
Various forges might have different ways to identify a user(username, email ,etc). An interface should be made available to get the admin user's identifier so that hard coding admin user values like we are doing here:
interface/git.py
34: def __init__(self, forge: Forge, admin_user: str, admin_email):
36: self.admin = InterfaceAdmin(admin_email, admin_user)
interface/forges/base.py
30: def __init__(self, host): # self, base_url: str, admin_user: str, admin_email):
interface/forges/gitea.py
31: def __init__(self): # self, base_url: str, admin_user: str, admin_email):
โ tmp.6358p3u9wv git:(master) rg GITEA.user
interface/forges/gitea.py
211: path = format("/%s/%s" % CONFIG.GITEA.username, repo)
216: "git@%s:%s/%s.git" % (self.host.netloc, CONFIG.GITEA.username, repo)
interface/runner.py
97: if all([n["type"] == PULL, owner == CONFIG.GITEA.username]):
interface/git.py
88: git = Git(forge, CONFIG.GITEA.username, CONFIG.SYSTEM.admin_email)
class Forge:
def __init__(self, host, admin_user, admin_email):
self.admin_user = admin_user
self.admin_email = admin_email
...
class Gitea(Forge):
def __init__(self):
super().__init__(settings.GITEA.host, settings.GITEA.username, settings.SYSTEM.admin_email)
A bug in Interface might result in high traffic to the forge.
GitHub recommends developers to set user-agent to their username, that way if there's unusual traffic from them, GitHub admins will be able to identify it and sort it out.
interface/libgit/src/system.rs
Line 186 in 238bb0b
Set static var in settings module like the warning message advises
venv/lib/python3.9/site-packages/dynaconf/base.py:151
/home/aravinth/code/forgedfed/interface/venv/lib/python3.9/site-packages/dynaconf/base.py:151: DeprecationWarning: Usage of `from dynaconf import settings` is now DEPRECATED in 3.0.0+. You are encouraged to change it to your own instance e.g: `settings = Dynaconf(*options)`
warnings.warn(
This should be changed to /comment
https://github.com/forgefedv2/interface/blob/ac8a0bbb30e506f4c24032b023d5ee930cad49c5/interface/client.py#L30
On a broader note, I think we should categorize groups together. The reason why we are using constants as opposed to string literals is to make sure a route update is reflected everywhere it's referenced. I think if we create something like this(see below), it will get rid of the inconsistency introduced through _construct_url
methods.
{
"issue":
{
"create": "/api/v1/issue/create",
"comment": "/api/v1/issue/comment"
}
}
Open API spec should be updated if changes are made #23
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.