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

Allow creation of issue comments in cml #1202

Merged
merged 15 commits into from
Oct 14, 2022

Conversation

tasdomas
Copy link
Contributor

@tasdomas tasdomas commented Oct 3, 2022

Closes #1180.

@tasdomas tasdomas temporarily deployed to internal October 3, 2022 11:11 Inactive
@tasdomas tasdomas temporarily deployed to internal October 3, 2022 12:28 Inactive
@tasdomas tasdomas temporarily deployed to internal October 3, 2022 13:01 Inactive
@casperdcl casperdcl added enhancement New feature or request cml-comment Subcommand ci-new New CI support request and removed ci-new New CI support request labels Oct 3, 2022
@tasdomas tasdomas temporarily deployed to internal October 4, 2022 08:31 Inactive
@tasdomas tasdomas changed the title Allow creation of issue comments in cml. Allow creation of issue comments in cml Oct 4, 2022
Copy link
Contributor

@dacbd dacbd left a comment

Choose a reason for hiding this comment

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

  issue: {
    type: 'number',
    description: 'Post to the given issue number',
    conflicts: ['pr', 'commitSha']
  },

conflicts with commitSha default value.
https://github.com/iterative/cml-playground/actions/runs/3187003743/jobs/5198152076

@tasdomas tasdomas temporarily deployed to internal October 5, 2022 09:03 Inactive
@tasdomas
Copy link
Contributor Author

tasdomas commented Oct 5, 2022

  issue: {
    type: 'number',
    description: 'Post to the given issue number',
    conflicts: ['pr', 'commitSha']
  },

conflicts with commitSha default value. https://github.com/iterative/cml-playground/actions/runs/3187003743/jobs/5198152076

Updated - thanks!

@tasdomas tasdomas temporarily deployed to internal October 6, 2022 12:54 Inactive
@tasdomas tasdomas temporarily deployed to internal October 6, 2022 14:42 Inactive
@tasdomas tasdomas temporarily deployed to internal October 6, 2022 15:40 Inactive
@tasdomas tasdomas temporarily deployed to internal October 7, 2022 09:01 Inactive
@@ -163,6 +163,7 @@ class CML {
const triggerSha = await this.triggerSha();
const {
commitSha: inCommitSha = triggerSha,
issue: issueId,
Copy link
Contributor

@casperdcl casperdcl Oct 7, 2022

Choose a reason for hiding this comment

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

bugging me as potential source of lots of future dev headache.

It's technically issueNumber, not issueId, right?

gh issue view $NUMBER --json id --jq .id != $NUMBER

Copy link
Contributor Author

Choose a reason for hiding this comment

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

github is not the only forge we support and on bitbucket and gitlab issue id is used.

Copy link
Contributor

Choose a reason for hiding this comment

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

the flag is still just --issue I don't feel this variable name that's not exposed to the user is a concern

@0x2b3bfa0 0x2b3bfa0 force-pushed the master branch 3 times, most recently from e2bed3a to fe9a06f Compare October 8, 2022 04:28
@tasdomas tasdomas temporarily deployed to internal October 11, 2022 12:11 Inactive
@tasdomas tasdomas marked this pull request as draft October 11, 2022 15:12
@tasdomas tasdomas changed the base branch from master to feature-comment-target October 14, 2022 14:12
@tasdomas tasdomas marked this pull request as ready for review October 14, 2022 14:12
@tasdomas tasdomas merged commit 9603e66 into feature-comment-target Oct 14, 2022
@tasdomas tasdomas deleted the d003-issue-comments branch October 14, 2022 14:13
@casperdcl
Copy link
Contributor

@tasdomas are you going to open a draft PR for https://github.com/iterative/cml/tree/feature-comment-target?

@tasdomas
Copy link
Contributor Author

@casperdcl I was planning to submit smaller PRs into the feature branch and then propose landing it in master once its done.

@casperdcl
Copy link
Contributor

May as well open a draft PR as well? Makes it easier to track (at least for me)

@casperdcl casperdcl mentioned this pull request Nov 16, 2022
4 tasks
tasdomas added a commit that referenced this pull request Dec 15, 2022
* Allow creation of issue comments in cml (#1202)

* Driver support for issue comments.

* Create or update issue comments.

* Add e2e issue comment creation tests for github and bitbucket drivers.

* Add gitlab issue comment e2e test.

* Add comment target flag and parsing (#1241)

* Add target cli option.

* Add comment target parsing.

* Add debug logging in comment target parsing.

Co-authored-by: DavidGOrtega <[email protected]>
Co-authored-by: Casper da Costa-Luis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cml-comment Subcommand enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issue comments
4 participants