Skip to content

first test - #7

Merged
joncodo merged 1 commit into
mainfrom
add-mocha
Jul 19, 2021
Merged

joncodo merged 1 commit into
mainfrom
add-mocha

Conversation

@kevin-kline

Copy link
Copy Markdown
Contributor

No description provided.

@joncodo
joncodo merged commit 0d09435 into main Jul 19, 2021
@joncodo
joncodo deleted the add-mocha branch July 19, 2021 14:02
joncodo pushed a commit that referenced this pull request Aug 24, 2021
jawad-khan added a commit to jawad-khan/incubator-devlake that referenced this pull request Feb 19, 2026
vbhanuchander-lang added a commit to vbhanuchander-lang/devlake that referenced this pull request Aug 10, 2026
Covers extraction and the scope config mapping end to end against a real
database, which the unit tests could not reach.

Extraction asserts the value normalisation per data type: a single_select
resolving to its option name and colour, an integral number rendering as
"5" rather than "5.0", a fractional number keeping its precision, a
multi_select joining option names while keeping the raw JSON array, and a
null value producing an empty value.

Conversion asserts the mapping reaches the domain issue -- priority,
component, story point and due date -- and, for the case that matters,
that an unparseable value is skipped with a warning rather than failing
the task or writing a wrong value: issue apache#7 carries "soon" in a date
field and a null priority, and comes out with neither set while the other
issues are untouched.
klesh pushed a commit that referenced this pull request Aug 12, 2026
…sues (#9038)

* feat(github): collect GitHub issue fields and map them onto domain issues

GitHub issue fields are organization-level structured issue metadata that
went generally available on 2026-07-02. They are typed, mutually exclusive
within a field, and shared across every repository in the organization —
which is what teams currently approximate with `type:`-style labels.

Collects issue field values and lets a scope config map a field onto an
issue column, where it takes precedence over the existing label regexes.

- New table `_tool_github_issue_field_values`, one row per issue per field,
  carrying a queryable text form of the value alongside the original JSON.
- New subtasks Collect/Extract Issue Field Values, both disabled by default
  so existing pipelines are unaffected until a mapping is configured.
- New scope config keys issueFieldPriority, issueFieldSeverity,
  issueFieldComponent, issueFieldStoryPoint and issueFieldDueDate, each
  holding a field *name*.

The mapping is applied in the issue convertor rather than written back into
`_tool_github_issues`: the collector iterates that table to build its request
URLs, so a subtask that both read and wrote it was a cycle in the subtask
graph. Converting instead also keeps the tool layer as raw GitHub truth and
avoids adding columns there.

A 404 from the field-values endpoint is treated as "no field values" so an
organization that has never configured issue fields, or a token that cannot
see them, does not fail the whole task.

* test(github): add an e2e dataflow test for issue field values

Covers extraction and the scope config mapping end to end against a real
database, which the unit tests could not reach.

Extraction asserts the value normalisation per data type: a single_select
resolving to its option name and colour, an integral number rendering as
"5" rather than "5.0", a fractional number keeping its precision, a
multi_select joining option names while keeping the raw JSON array, and a
null value producing an empty value.

Conversion asserts the mapping reaches the domain issue -- priority,
component, story point and due date -- and, for the case that matters,
that an unparseable value is skipped with a warning rather than failing
the task or writing a wrong value: issue #7 carries "soon" in a date
field and a null priority, and comes out with neither set while the other
issues are untouched.

* fix(github): register the issue field values table in GetTablesInfo

Test_GetPluginTablesInfo compares the plugin's declared tables against the
ones its migrations create, and the new table was missing from the list:

  table_info_test.go:121: The following tables are not returned by the
  TablesInfo method
      _tool_github_issue_field_values

Adds GithubIssueFieldValue to Github.GetTablesInfo(). Verified inside the
mericodev/lake-builder image the unit-test job uses, since the plugins
package needs libgit2 to build.
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