Skip to content

Conversation

@AAndrisa
Copy link
Contributor

@AAndrisa AAndrisa commented Oct 6, 2025

Pull Request Description

If the documentation label is set to the opened PR then we skip the projects building jobs.
The condition on the jobs is: if the build reason is different from PR build anyway, and if it's a PR, build just if the documentation label is not found.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

If the documentation label is set to the opened PR then we skip the
projects building jobs.
The condition on the jobs is: if the build reason is different from PR
build anyway, and if it's a PR, build just if the documentation label is
not found.

Signed-off-by: Andreea Andrisan <Andreea.Andrisan@analog.com>
Copy link
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

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

I am not sure how useful this approach is, taking into consideration that people (especially the external contributers) don't add labels to the PRs (or add the labels after the PR is opened).

I'd rather check if the PR contains only changes in the doc folder or README.rst files and skip the unnecessary builds.

Copy link
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

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

this will definitely make sense if we have an automated procedure of adding tags to the PRs as it is for example on zephyr.

Copy link
Contributor

@gastmaier gastmaier left a comment

Choose a reason for hiding this comment

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

If you use jq, know the base and head commit and has the gh-token
, you can do the diff api call, jq to get changed files list, then grep inverse

base_sha=c57ad676601eeaaae079ba957226aac4946cf578
head_sha=ed74585994569c068c25f23ccdf45173ffce731e
curl -s -L  \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $gh_token"  \
  -H "X-GitHub-Api-Version: 2022-11-28"  \
      "https://api.github.com/repos/analogdevicesinc/no-OS/compare/$base_sha...$head_sha" | \
   jq '.files[].filename' -r | \
   grep -v '^doc/' && \ 
  echo "others changed" || \
  echo "only docs changed"

I do this api call for the checkout that unrolls the merge commit at
https://github.com/analogdevicesinc/doctools/blob/action/checkout/action.yml#L79-L84
and wondered a few times how to do what we are discussing here, so decide to chime in as well and try out other solution

I think the XOR logic will be confusing, because if I open pr with a driver, + the README.rst, wouldn't I intuitively add both labels driver, documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants