Skip to content

Action:Automatic pull request labeler - #2291

Merged
marcotc merged 7 commits into
masterfrom
action-label-prs
Oct 3, 2022
Merged

marcotc merged 7 commits into
masterfrom
action-label-prs

Conversation

@marcotc

@marcotc marcotc commented Sep 27, 2022

Copy link
Copy Markdown
Member

This PR automatically adds GitHub labels to PRs where it's safe to assume their intent.

Some examples are PRs that:

  • Only change documentation files.
  • Only change test files.
  • Only change release-related files.
  • Changes files in a specific product directory (e.g. ci, profiling).

@marcotc marcotc added the dev/github Github repository maintenance and automation label Sep 27, 2022
@marcotc
marcotc requested a review from a team September 27, 2022 00:39

@ivoanjo ivoanjo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 Thanks for being our GitHub wizard and pushing our automation forward :)

Comment thread .github/labeler.yml Resolved
Comment thread .github/labeler.yml Resolved
Comment thread .github/labeler.yml Outdated
Comment on lines +36 to +38
# Version bump pull request
release:
- all: [ '{CHANGELOG.md,lib/ddtrace/version.rb,gemfiles/**}' ]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Really minor: Since we've done a few releases where we didn't bump all the gemfiles, I wonder if it would make sense to relax this rule to take that into account.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is that so? When a release is done at least ddtrace (x.y.z) should get an update in the lockfiles, correct?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes and no. The way we've set up CI is that the CI runners will do the update locally anyway, thus we can actually not update it and things will still be fine.

But we do want the lockfiles to be updated from time to time, so this is why we have it as a step of the release process.

So my question/suggestion was more of a: should we consider here the exceptional cases where we do a release and skip the lockfile update?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm removing gemfile bump from this list, to ensure we have no false positives on the release tag.

Comment thread .github/labeler.yml Outdated

# Changes to Tracing integrations
integrations:
- any: [ 'lib/datadog/tracing/contrib/**' ]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should there be 'lib/datadog/appsec/contrib/**' here too? Maybe `'lib/datadog/ci/contrib/**' as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also should there be a general tracing one as well?

tracing:
  - any: [ 'lib/datadog/tracing/**' ]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure what the behaviour is when multiple criteria apply (e.g resulting in AppSec+Integrations tags, which sounds good to me if someone changes AppSec integration code).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also this non-product one sounds OK to me as well:

core:
  - any: [ 'lib/datadog/core/**' ]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied all 3 suggested changes.

Comment thread .github/labeler.yml

# Changes to CI-App
ci-app:
- any: [ 'lib/datadog/ci/**' ]

@kachkaev kachkaev Oct 3, 2022 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for giving my fork a go @marcotc! Does this glob work the same as lib/datadog/ci/**/*? I can update docs in actions/labeler#316 if so.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you for the changes, @kachkaev! Couldn't use the GH Action without it! 🙇

Yes, it works the same.

minimatch("root/a/b/c", "root/**/*")
// true
minimatch("root/a/b/c", "root/**")
// true 

@marcotc marcotc self-assigned this Oct 3, 2022
@marcotc
marcotc merged commit f5abf1c into master Oct 3, 2022
@marcotc
marcotc deleted the action-label-prs branch October 3, 2022 18:21
@github-actions github-actions Bot added this to the 1.6.0 milestone Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/github Github repository maintenance and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants