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

Clarification Needed on PR Creation Behavior by the Plugin #214

Open
haziz-du opened this issue Oct 21, 2024 · 5 comments
Open

Clarification Needed on PR Creation Behavior by the Plugin #214

haziz-du opened this issue Oct 21, 2024 · 5 comments

Comments

@haziz-du
Copy link

Hi, the plugin works fine, but the documentation is unclear about when a PR from the release is created.
Sometimes, even when the job is triggered from the default repository branch, no PR is created by the plugin, and other times it is.

I would like to understand when a PR will be created by the plugin and when it will not. Could you please clarify?

@haziz-du
Copy link
Author

@anbraten any input will be helpful, thanks

@anbraten
Copy link
Member

The plugin checks for changes (commits with associated PRs) and as soon as there is a single one it will create the release PR. Could you provide some logs. Which forge are you using?

@haziz-du
Copy link
Author

haziz-du commented Oct 23, 2024

@anbraten The forge I'm using is Gitea,

You said "commits with associated PRs",

Let's say I have a repo with branch main as the default branch , and then I created a feature branch out of main, did my changes and create a PR to merge it to main, approved the merge and merge it and the release plugin is triggered because a push event (the merge commit), the plugin will not create a PR in this case as there are no commits associated with PR right ? Happened to me multiple times.

Then how the workflow is supposed to be ?
Thank you so much !

@anbraten
Copy link
Member

That's how I would imagine it to work. Create branch feature merge it, plugin checks all commits not part of a commit and creates a PR with the changelog. I've only used the plugin with squashing yet and it might be that "normal" merging doesn't work. I am also not 100% sure if the api of Gitea works correctly when checking if a commit is having a PR linked. What's your log from the plugin when running on main?

@haziz-du
Copy link
Author

haziz-du commented Oct 23, 2024

@anbraten Here is one of job's log

Ps: url is omitted

# Event type: push
# Commit message was: CI- TEST

gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '104',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# Should next version be a release candidate: no
# Lastest tag is: 1.1.6
# Found 18 untagged commits
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. d1791a143e44ab311ee4030bde0d51b5126ada97: "CI- TEST"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 85e4ab4b70996125fe8235b494ad0e4845c6099b: "CI: test plugin with old woody"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. ac6f3de5e795dc2158c97dbe2fdc24bb382e60c9: "CI: test release"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. b204a75aafc995746ac2df2c7023d710f0bc97b9: "CI: Enable debugging"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. c47ec2d6ace39396e2f310f35a0070743485ccce: "Merge pull request 'Testing' (#4) from next-release/master into master"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 122074b3ece39c0e457d51693525c8aa94d20fa4: "Testing"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 4e9fecea9bf16aa3a1b3d6cff4f193053b89c2e7: "Merge pull request 'add doc and test release' (#3) from develop into master"
# No pull-request found for commit, skipping. c2503bcbebda5cc9bb99503a3eb810d11e084a90: "[SKIP CI] add doc and test for release"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 1e2b224d477da7573bab274b4d573d804bb3d7b5: "Merge pull request 'Improve CI/CD doc and test release' (#2) from develop into master"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. fac7c9006b8f0b6f375d343b26144b9fe7249d62: "Merge remote-tracking branch 'origin/develop' into develop"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. c150a1e329140507061cdb347e8b4b11b0db5bbd: "CI-CD: Improve doc"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 715f26048ada76dadb5c0ab20d2b3e2a6b4382ac: "Merge pull request 'Test' (#1) from develop into master"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. e24bfb40ed7a6482cbc44b19ff8788d08672865d: "Test"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. f6ce0d4ae0f59ddf819f0088757512a2d8c55275: "CI- Fix plugin release syntax"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 70afbb0bb36fe9639c8cebf728d4a7eff0273475: "Add develop branch condition"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. b44556474c2db76d4b7f312ac486bc2baea09aa2: "[SKIP CI] Add release-helper"
gitea error Response {
  status: 404,
  statusText: 'Not Found',
  headers: Headers {
    'cache-control': 'max-age=0, private, must-revalidate, no-transform',
    'content-length': '173',
    'content-type': 'application/json;charset=utf-8',
    date: 'Mon, 21 Oct 2024 13:48:03 GMT',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'SAMEORIGIN'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: false,
  redirected: false,
  type: 'basic',
  url: ""
}
# No pull-request found for commit, skipping. 5cacfc1606b52b864ddb984d02cf0949624f3106: "[SKIP CI] - use better naming"
changes []
# No changes or unable to bump semver version.

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

No branches or pull requests

2 participants