-
Notifications
You must be signed in to change notification settings - Fork 535
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
[Feature][Data Schema] Add an original_status
field to table pull_requests and use status
to indicate standardized statuses
#4745
[Feature][Data Schema] Add an original_status
field to table pull_requests and use status
to indicate standardized statuses
#4745
Comments
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs. |
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future. |
The azure statuses we get from API are described here
|
@CamilleTeruel Are these all Azure PR statuses? I noticed that there're statuses like 'pending', 'failed', and 'error' as described in the Azure API docs. Have we standardized them or kept the original values? |
There is also
Those are the original values.
|
That's very clear. Thank you, @CamilleTeruel |
I tested the PR statuses with the SQL below and it passed:
|
Search before asking
Use case
DevLake has to standardize pull request statuses from GitHub, GitLab, and BitBucket to provide pre-defined PR/MR metrics in dashboards such as Engineering Overview, as the queries in this dashboard should clearly define which PR is open, merged, or closed in any potential tools.
However, if DevLake transformed the original PR statuses into standardized statuses, users might be confused as the standardized values are different from the original ones.
Therefore, both the original and standardized value of PR statuses need to save in table.pull_requests.
Description
There should be three possible values of
status
in pull_requests. All PR/MRs from GitHub, GitLab, BitBucket, and Azure Repo should be transformed into these values:For BitBucket PRs:
OPEN
-> OPENMERGED
-> MERGEDDECLINED
-> CLOSEDFor GitHub PRs from RESTful:
OPEN
-> OPENCLOSED
and merged_date is not null -> MERGEDCLOSED
and merged_date is null -> CLOSEDFor GitHub PRs from GraphQL:
OPEN
-> OPENMERGED
-> MERGEDCLOSED
-> CLOSEDFor GitLab PRs:
opened
-> OPENmerged
-> MERGEDclosed
orlocked
-> CLOSEDFor Azure PRs (refer to this doc, can you please help verify this? @CamilleTeruel ):
active
-> OPENmerged
-> MERGEDabandoned
-> CLOSEDTo Do:
original_status
field to table pull_requests to save the original PR/MR statusstatus
in table pull_requests based on the above rules.Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: