github - 当分支需要拉取请求时如何提交到主分支
问题描述
我有几个 GitHub 项目,当主分支使用功能分支更新时,它们会影响构建版本。
脚本通常会git commit
像这样从命令行执行:
if ! git diff-files --quiet
then
echo "Using pattern: '$INPUT_PATTERN' and commit message: $INPUT_COMMIT_MESSAGE"
git status | grep -v "Your branch is" | grep -v "Changes not staged" | grep -v "(use \"git"
git add "$INPUT_PATTERN"
git commit -m "$INPUT_COMMIT_MESSAGE" 2> /dev/null || true
git push 2> /dev/null
else
echo "No difference detected in $GITHUB_REPOSITORY, did not use pattern: $INPUT_PATTERN"
fi
为了做到这一点,分支在合并之前不能要求拉取请求。如果主分支必须有拉取请求,这怎么可能呢?如果它们必须在合并前进行审查?
解决方案
推荐阅读
- r - 将 ggpredict() 和 ggplot2() 与缩放的连续变量一起使用并尝试对它们进行缩放
- javascript - 我在反应中创建可拖动组件时出错
- asp.net - ASP.NET Core mvc 应用程序中的 FFMPEG 录制
- c++ - 使用 for_each 删除向量的元素
- python - 在另一个函数中使用变量
- excel - 有没有办法在excel中计算工作时间
- postgresql - 在 postgres 中查询 pg_class 以获取索引名称时,为什么其中一些出现以 # 为前缀?
- r - 使用因子列在 r 中创建一个数值列
- javascript - 尝试使用javascript使用递归打印数字的阶乘,但没有给出预期的输出
- c++ - 为什么 if 语句没有打印出字符串?cpp